ngx-pinch-zoom icon indicating copy to clipboard operation
ngx-pinch-zoom copied to clipboard

Cannot read property 'destroy' of undefined at PinchZoom

Open IgorKurkov opened this issue 4 years ago • 1 comments

When try to open page with pinch-zoom image on SSR - the error has happened.

TypeError: Cannot read property 'destroy' of undefined
    at PinchZoomComponent.Ysow.PinchZoomComponent.destroy (C:\Projects\my-project\dist\server\main.js:200137:28)
    at PinchZoomComponent.Ysow.PinchZoomComponent.ngOnDestroy (C:\Projects\my-project\dist\server\main.js:200028:18)
    at callProviderLifecycles (C:\Projects\my-project\dist\server\main.js:80907:22)
    at callElementProvidersLifecycles (C:\Projects\my-project\dist\server\main.js:80875:17)
    at callLifecycleHooksChildrenFirst (C:\Projects\my-project\dist\server\main.js:80865:33)
    at destroyView (C:\Projects\my-project\dist\server\main.js:89033:9)
    at callViewAction (C:\Projects\my-project\dist\server\main.js:89159:17)
    at execEmbeddedViewsAction (C:\Projects\my-project\dist\server\main.js:89102:21)
    at destroyView (C:\Projects\my-project\dist\server\main.js:89031:9)
    at callViewAction (C:\Projects\my-project\dist\server\main.js:89159:17)
    at execComponentViewsAction (C:\Projects\my-project\dist\server\main.js:89081:17)
    at destroyView (C:\Projects\my-project\dist\server\main.js:89032:9)
    at callViewAction (C:\Projects\my-project\dist\server\main.js:89159:17)
    at execEmbeddedViewsAction (C:\Projects\my-project\dist\server\main.js:89102:21)
    at destroyView (C:\Projects\my-project\dist\server\main.js:89031:9)
    at callViewAction (C:\Projects\my-project\dist\server\main.js:89159:17)
    at execEmbeddedViewsAction (C:\Projects\my-project\dist\server\main.js:89102:21)
    at destroyView (C:\Projects\my-project\dist\server\main.js:89031:9)
    at callViewAction (C:\Projects\my-project\dist\server\main.js:89159:17)
    at execComponentViewsAction (C:\Projects\my-project\dist\server\main.js:89081:17)
    at destroyView (C:\Projects\my-project\dist\server\main.js:89032:9)
    at callViewAction (C:\Projects\my-project\dist\server\main.js:89159:17)
    at execEmbeddedViewsAction (C:\Projects\my-project\dist\server\main.js:89102:21)
    at destroyView (C:\Projects\my-project\dist\server\main.js:89031:9)
    at callViewAction (C:\Projects\my-project\dist\server\main.js:89159:17)
    at execComponentViewsAction (C:\Projects\my-project\dist\server\main.js:89081:17)
    at destroyView (C:\Projects\my-project\dist\server\main.js:89032:9)
    at callViewAction (C:\Projects\my-project\dist\server\main.js:89159:17)
    at execEmbeddedViewsAction (C:\Projects\my-project\dist\server\main.js:89102:21)
    at destroyView (C:\Projects\my-project\dist\server\main.js:89031:9)
    at callViewAction (C:\Projects\my-project\dist\server\main.js:89159:17)
    at execComponentViewsAction (C:\Projects\my-project\dist\server\main.js:89081:17)
    at Object.destroyView (C:\Projects\my-project\dist\server\main.js:89032:9)
    at ViewRef_.destroy (C:\Projects\my-project\dist\server\main.js:80196:22)
    at C:\Projects\my-project\dist\server\main.js:86636:71
    at Array.forEach (<anonymous>)
    at ApplicationRef.ngOnDestroy (C:\Projects\my-project\dist\server\main.js:86636:33)
    at callNgModuleLifecycle (C:\Projects\my-project\dist\server\main.js:79808:35)
    at NgModuleRef_.destroy (C:\Projects\my-project\dist\server\main.js:80409:13)
    at C:\Projects\my-project\dist\server\main.js:86286:77
    at Array.forEach (<anonymous>)
    at PlatformRef.destroy (C:\Projects\my-project\dist\server\main.js:86286:35)
    at complete (C:\Projects\my-project\dist\server\main.js:96238:30)
    at C:\Projects\my-project\dist\server\main.js:96242:28
    at ZoneDelegate.invoke (C:\Projects\my-project\dist\server.js:599:26)
    at Zone.run (C:\Projects\my-project\dist\server.js:358:43)
    at C:\Projects\my-project\dist\server.js:1118:34
    at ZoneDelegate.invokeTask (C:\Projects\my-project\dist\server.js:631:31)
    at Zone.runTask (C:\Projects\my-project\dist\server.js:403:47)
    at drainMicroTaskQueue (C:\Projects\my-project\dist\server.js:809:35)

any ideas? Could it work with SSR?

IgorKurkov avatar Apr 14 '20 16:04 IgorKurkov

same problem here !

WaseemRakab avatar Jan 08 '22 11:01 WaseemRakab