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

Invalid left-hand side in assignment (Angular) #583

Closed
kisimediaDE opened this issue Jan 16, 2023 · 6 comments · May be fixed by #661
Closed

Invalid left-hand side in assignment (Angular) #583

kisimediaDE opened this issue Jan 16, 2023 · 6 comments · May be fixed by #661
Assignees
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@kisimediaDE
Copy link

Hey, I'm using your plugin in an angular application.
Since some weeks I have the problem, that when I try to deploy the application to the server I get the message "Invalid left-hand side in assignment"
No I was able to figure out the issue.

It's caused by two lines of your code:

window && window?.globalThis && (window?.globalThis.AsyncEncryptStorage = A)
window && window?.globalThis && (window?.globalThis.EncryptStorage = b)

And appears since this commit: 296629d and/or 85d2e7d

I can run the app again if I remove the ? behind window.
I'm not sure why you using this when you checking before if window is defined?

I hope you know what I mean and you can help me with this issue.
Thank you so much already! :-)

(If you need more information, please ask!)

@kisimediaDE
Copy link
Author

The latest version that is working is 2.12.8
After this it breaks with the "Invalid left-hand side in assignment" error message

@michelonsouza
Copy link
Owner

Hello @kisimediaDE, hope you are doing well.
I'm going to adjust this, I put this code to always have a representation in the window interface. Looks like that ended up backfiring.

But I find it strange, because I'm doing validations, like the ones below:

/* istanbul ignore next */
if (window) {
  /* istanbul ignore next */
  (window as any).EncryptStorage = EncryptStorage;
}

/* istanbul ignore next */
if (window && window?.globalThis) {
  /* istanbul ignore next */
  (window?.globalThis as any).EncryptStorage = EncryptStorage;
}

The compiled code that must be causing this mess.

I promise to fix it in the next implementations.

Thank you very much.

@michelonsouza michelonsouza self-assigned this Feb 6, 2023
@michelonsouza michelonsouza added bug Something isn't working wontfix This will not be worked on labels Feb 6, 2023
@Sireini
Copy link

Sireini commented Apr 14, 2023

@michelonsouza I am facing the same issue, this will not be fixed?

@wradhalo
Copy link

it's still happening on version 2.12.16 @michelonsouza

@kisimediaDE
Copy link
Author

I agree still the same issue with the latest version @michelonsouza

@aspann
Copy link

aspann commented Jun 14, 2023

I'm a bit confused. You say that you promise to fix it, but the issue is closed with the label "wontfix".

So what is the state here? (we also facing this issue in several projects)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants