Skip to content

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