nativescript-community / ui-material-components

Monorepo that contains all of the NativeScript Material Design plugins.
https://nativescript-community.github.io/ui-material-components/
Apache License 2.0
219 stars 80 forks source link

[Tabs] [Angular] [IOS] Uncaught TypeError: Cannot read property 'ios' of undefined #278

Closed valera1401 closed 3 years ago

valera1401 commented 3 years ago

Which platform(s) does your issue occur on? iOS, emulator, 14.4 Please, provide the following version numbers that your issue occurs with: CLI: 8.0.1 Cross-platform modules: 8.0.0 Runtime(s): 8.0.0 Plugin(s): 5.2.20

The error occurs if has no child element.

NativeScript encountered a fatal error: Uncaught TypeError: Cannot read property 'ios' of undefined at getViewController(file: src/webpack:/@nativescript/template-hello-world-ng/node_modules/@nativescript-community/ui-material-tabs/tabs.ios.js:526:0) at (file: src/webpack:/@nativescript/template-hello-world-ng/node_modules/@nativescript-community/ui-material-tabs/tabs.ios.js:573:0) at setViewControllers(file: src/webpack:/@nativescript/template-hello-world-ng/node_modules/@nativescript-community/ui-material-tabs/tabs.ios.js:572:0) at [tabStrip:setNative](file: src/webpack:/@nativescript/template-hello-world-ng/node_modules/@nativescript-community/ui-material-tabs/tabs.ios.js:895:0) at applyAllNativeSetters(file: src/webpack:/@nativescript/template-hello-world-ng/node_modules/@nativescript/core/ui/core/properties/index.js:1137:0) at initNativeView(file: src/webpack:/@nativescript/template-hello-world-ng/node_modules/@nativescript/core/ui/core/properties/index.js:1080:0) at onResumeNativeUpdates(file: src/webpack:/@nativescript/template-hello-world-ng/node_modules/@nativescript/core/ui/core/view-base/index.js:737:22) at _resumeNativeUpdates(file: src/webpack:/@nativescript/template-hello-world-ng/node_modules/@nativescript/core/ui/core/view-base/index.js:280:0) at onLoaded(file: src/webpack:/@nativescript/template-hello-world-ng/node_modules/@nativescript/core/ui/core/view-base/index.js:235:0) at onLoaded(file: src/webpack:/@nativescript/template-hello-world-ng/node_modules/@nativescript-community/ui-material-tabs/tabs.ios.js:413:0) at (file: src/webpack:/@nativescript/template-hello-world-ng/node_modules/@nativescript/core/ui/core/view-base/index.js:318:0) at callFunctionWithSuper(file: src/webpack:/@nativescript/template-hello-world-ng/node_modules/@nativescript/core/ui/core/view-base/index.js:312:0) at callLoaded(file: src/webpack:/@nativescript/template-hello-world-ng/node_modules/@nativescript/core/ui/core/view-base/index.js:318:0) at loadView(file: src/webpack:/@nativescript/template-hello-world-ng/node_modules/@nativescript/core/ui/core/view-base/index.js:458:0) at (file: src/webpack:/@nativescript/template-hello-world-ng/node_modules/@nativescript/core/ui/core/view-base/index.js:237:0) at eachChildView(file: src/webpack:/@nativescript/template-hello-world-ng/node_modules/@nativescript/core/ui/layouts/layout-base-common.js:101:0) at eachChild(file: src/webpack:/@nativescript/template-hello-world-ng/node_modules/@nativescript/core/ui/core/view/view-common.js:759:0) at onLoaded(file: src/webpack:/@nativescript/template-hello-world-ng/node_modules/@nativescript/core/ui/core/view-base/index.js:236:0) at (file:///app/ven<…>

farfromrefug commented 3 years ago

@valera1401 why not having child element ?

valera1401 commented 3 years ago

@valera1401 why not having child element ?

Not a real case. In my opinion it shouldn't crash the app. And it is not an issue on Android.

farfromrefug commented 3 years ago

@valera1401 well maybe but i dont think it is easily fixable so i will close this as no real life case ;)