NetanelBasal/ngx-auto-unsubscribe

Error with prod build on IE 11

BorntraegerMarc opened this issue · 3 comments

In IE I get the following error when running the app in prod mode. This is my code:

@AutoUnsubscribe()
export class LoginComponent implements OnDestroy {
    private loginSub: Subscription;
    public ngOnDestroy(): void {
    }
}

This is the error:

ERROR Error: Uncaught (in promise): TypeError: Object doesn't support property or method 'includes'
TypeError: Object doesn't support property or method 'includes'
   at e.prototype.ngOnDestroy (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:1117979)
   at Nn (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:36390)
   at Mn (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:36134)
   at kn (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:36010)
   at mr (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:49165)
   at t.prototype.destroy (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:124668)
   at e.prototype.destroy (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:121686)
   at t.prototype.deactivate (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:290915)
   at t.prototype.deactivateRouteAndOutlet (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:281394)
   at t.prototype.deactivateRouteA
   "ERROR"
   {
      [functions]: ,
      __proto__: { },
      description: "Uncaught (in promise): TypeError: Object doesn't support property or method 'includes'
TypeError: Object doesn't support property or method 'includes'
   at e.prototype.ngOnDestroy (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:1117979)
   at Nn (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:36390)
   at Mn (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:36134)
   at kn (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:36010)
   at mr (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:49165)
   at t.prototype.destroy (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:124668)
   at e.prototype.destroy (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:121686)
   at t.prototype.deactivate (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:290915)
   at t.prototype.deactivateRouteAndOutlet (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:281394)
   at t.prototype.deactivateRouteAndItsChildren",
      message: "Uncaught (in promise): TypeError: Object doesn't support property or method 'includes'
TypeError: Object doesn't support property or method 'includes'
   at e.prototype.ngOnDestroy (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:1117979)
   at Nn (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:36390)
   at Mn (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:36134)
   at kn (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:36010)
   at mr (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:49165)
   at t.prototype.destroy (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:124668)
   at e.prototype.destroy (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:121686)
   at t.prototype.deactivate (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:290915)
   at t.prototype.deactivateRouteAndOutlet (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:281394)
   at t.prototype.deactivateRouteAndItsChildren",
      name: "Error",
      promise: { },
      rejection: { },
      stack: "Error: Uncaught (in promise): TypeError: Object doesn't support property or method 'includes'
TypeError: Object doesn't support property or method 'includes'
   at e.prototype.ngOnDestroy (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:1117979)
   at Nn (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:36390)
   at Mn (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:36134)
   at kn (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:36010)
   at mr (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:49165)
   at t.prototype.destroy (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:124668)
   at e.prototype.destroy (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:121686)
   at t.prototype.deactivate (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:290915)
   at t.prototype.deactivateRouteAndOutlet (http://localhost:5001/vendor.5f0ba2a42769d6fe9411.bundle.js:1:281394)
   at t.prototype.deactivateRouteAndItsC",
      Symbol(observable)_i.mq3bxu56l2r: undefined,
      Symbol(react.element)_g.mq3bxu56l2r: undefined,
      Symbol(rxSubscriber)_h.mq3bxu56l2r: undefined,
      task: { },
      zone: { }
   }

If I remove the @AutoUnsubscribe() annotation, IE works

@NetanelBasal Seems to work fine, thx! One remark, though: I think you forgot to bump the package.json version number and git tag. There it is still on v1.0.0

From npm: 1.0.1 is the latest of 2 releases. I just need to update the git tag, thanks.