SimonTestNet / SimonTest

Repository for SimonTest questions and issues https://simontest.net
16 stars 2 forks source link

Cannot read property 'namedBindings' of undefined #28

Closed Bengejd closed 5 years ago

Bengejd commented 5 years ago

This seems to occur when importing rxjs via: import 'rxjs/add/operator/map';

ManuelDeLeon commented 5 years ago

Thanks for the notice. I can't repro the error. Can you strip the file of anything not necessary to reproduce the error and post it here? Thanks.

Bengejd commented 5 years ago

Hmmm. After doing some more testing, and stripping out everything from the file, it turns out it's linked directly to when you are setting a public variable to be undefined, while also importing rxjs in the manner I mentioned above. When you comment out the rxjs import line, the file proceeds as normal, and the same occurs if you comment out the undefined variable instead of the rxjs import.

Here is a simplified file:

import 'rxjs/add/operator/map'; // Comment out this, and it works.

import { Injectable } from '@angular/core';

@Injectable()
export class TestService {
  user: any = undefined;  // Or comment out this, and it works.
  constructor() {}
}

So running it as is, will throw the error, but commenting out either the variable or the import, it will work as expected.

ManuelDeLeon commented 5 years ago

Thanks. Will get a fix for it soon.

ManuelDeLeon commented 5 years ago

Update to 1.4.1

Thanks again.

Bengejd commented 5 years ago

Thanks for the quick turnaround!