Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nz-switch distory issue #3760

Closed
luke-emmental opened this issue Jul 10, 2019 · 1 comment · Fixed by #3784
Closed

nz-switch distory issue #3760

luke-emmental opened this issue Jul 10, 2019 · 1 comment · Fixed by #3784

Comments

@luke-emmental
Copy link

Reproduction link

https://stackblitz.com/edit/ng-zorro-antd-start-dfawrw?file=package.json

Steps to reproduce

sometimes nz-switch occur error

What is expected?

normal active

What is actually happening?

app-error-handler.ts:49 TypeError: Cannot read property 'nativeElement' of undefined
    at NzSwitchComponent.push.../../node_modules/ng-zorro-antd/fesm5/ng-zorro-antd-switch.js.NzSwitchComponent.ngOnDestroy (ng-zorro-antd-switch.js:134)
    at callProviderLifecycles (core.js:22087)
    at callElementProvidersLifecycles (core.js:22055)
    at callLifecycleHooksChildrenFirst (core.js:22045)
    at destroyView (core.js:30062)
    at callViewAction (core.js:30188)
    at execComponentViewsAction (core.js:30110)
    at destroyView (core.js:30061)
    at callViewAction (core.js:30188)
    at execComponentViewsAction (core.js:30110)
Environment Info
ng-zorro-antd 8.0.2
Browser chrome, firefox, safari

I think change @ViewChild static is false => true

@wzhudev
Copy link
Member

wzhudev commented Jul 10, 2019

@luke-emmental There is no error in the console. Please describe in detail.

屏幕快照 2019-07-10 上午11 09 13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants