Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4840

TypeError: Right-hand side of 'instanceof' is not an object

$
0
0

@Frank wrote:

I am updating my app from 3.11 to 3.12. I had not this problem prior to updating.

When I try to login, I get this error

TypeError: Right-hand side of 'instanceof' is not an object

Following the stack trace, this happens in my application.js file, in that part.

error(error, transition) { if (error instanceof NotFoundError) { this.replaceWith('login'); return true; } if (error instanceof AdapterError) { if (get(this, 'session').get('isAuthenticated')) { get(this, 'session').invalidate(); } return true; }

They are imported like this, as shown in the doc here

In the top of my application.js file

import { NotFoundError } from '@ember-data/adapter/error'; import { AdapterError } from '@ember-data/adapter/error';

I can’t figure out what is wrong.

Here is the whole stack trace

TypeError: Right-hand side of 'instanceof' is not an object at Class.error (application.js:144) at Class.triggerEvent (router.js:1295) at PrivateRouter.triggerEvent (router.js:175) at Transition.trigger (router_js.js:464) at PrivateRouter.transitionDidError (router.js:197) at router_js.js:270 at invokeCallback (rsvp.js:490) at publish (rsvp.js:473) at publishRejection (rsvp.js:409) at rsvp.js:16

Anyone has an idea to fix that?

Thanks!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4840

Trending Articles