|
@@ -172,24 +172,23 @@ function convertStyleParams(originalStyleObject) {
|
172
|
172
|
|
173
|
173
|
function convertDrawerParamsToSideMenuParams(drawerParams) {
|
174
|
174
|
const drawer = Object.assign({}, drawerParams);
|
175
|
|
- if (!drawer.left || !drawer.left.screen) {
|
176
|
|
- return null;
|
177
|
|
- }
|
178
|
175
|
|
179
|
176
|
let result = {
|
180
|
177
|
left: {},
|
181
|
178
|
right: {}
|
182
|
179
|
};
|
183
|
|
- result.disableOpenGesture = drawer.disableOpenGesture !== undefined;
|
184
|
|
- result.left.screenId = drawer.left.screen;
|
185
|
|
- addNavigatorParams(result.left);
|
186
|
|
- result.left = adaptNavigationParams(result.left);
|
187
|
|
- result.left.passProps = drawer.left.passProps;
|
188
|
|
-
|
189
|
|
- result.right.screenId = drawer.right.screen;
|
190
|
|
- addNavigatorParams(result.right);
|
191
|
|
- result.right = adaptNavigationParams(result.right);
|
192
|
|
- result.right.passProps = drawer.right.passProps;
|
|
180
|
+
|
|
181
|
+ Object.keys(result).forEach((key) => {
|
|
182
|
+ if (drawer[key] && drawer[key].screen) {
|
|
183
|
+ result[key].screenId = drawer[key].screen;
|
|
184
|
+ addNavigatorParams(result[key]);
|
|
185
|
+ result[key] = adaptNavigationParams(result[key]);
|
|
186
|
+ result[key].passProps = drawer[key].passProps;
|
|
187
|
+ result[key].disableOpenGesture = drawer.disableOpenGesture;
|
|
188
|
+ } else {
|
|
189
|
+ result[key] = null;
|
|
190
|
+ }
|
|
191
|
+ })
|
193
|
192
|
|
194
|
193
|
return result;
|
195
|
194
|
}
|