Skip to content

Fix for constructor class names #3

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

Closed
wants to merge 1 commit into from

Conversation

bruno12mota
Copy link

Weird thing I run in today, was using https://github.com/Microsoft/monaco-editor-webpack-plugin to load up monaco and seems like monaco has css classes called "constructor". This lead to errors since:

exports[name] = exports[name] || [];

would evaluate to the constructor function. Meaning that the next line:

exports[name].indexOf(scopedName)

would throw a type error since Function.indexOf is not a function. The PR solves this issue, let me know if anyone has a better solution for it.

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add test?

@bruno12mota
Copy link
Author

Sure @evilebottnawi , I'll add it 👍

@bruno12mota
Copy link
Author

Actually this has been fixed in version 2.0.1 with Object.create(null). My local project was using 1.1.0

@bruno12mota
Copy link
Author

Sorry about that, closing the PR 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants