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

fix: className conflict to keyword like constuctor or toString #1

Merged
merged 3 commits into from
Nov 27, 2018
Merged

fix: className conflict to keyword like constuctor or toString #1

merged 3 commits into from
Nov 27, 2018

Conversation

cottom
Copy link
Contributor

@cottom cottom commented Nov 9, 2018

Third part lib like monaco-editor has the css selector name like .constructor which conflict with Object's keywords.😂

@codecov-io
Copy link

codecov-io commented Nov 9, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@41f5b08). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##             master     #1   +/-   ##
=======================================
  Coverage          ?   100%           
=======================================
  Files             ?      1           
  Lines             ?    103           
  Branches          ?     24           
=======================================
  Hits              ?    103           
  Misses            ?      0           
  Partials          ?      0
Impacted Files Coverage Δ
src/index.js 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 41f5b08...277eabe. Read the comment docs.

@cottom
Copy link
Contributor Author

cottom commented Nov 19, 2018

@evilebottnawi can you release a patch version?

@alexander-akait
Copy link
Member

@jerry-i hm, how we can test this?

@cottom
Copy link
Contributor Author

cottom commented Nov 23, 2018

@evilebottnawi I have add one test case for it. And you can see the erorr case online.

@alexander-akait
Copy link
Member

@jerry-i thanks will be released in patch version in near future

src/index.js Outdated
@@ -58,7 +58,8 @@ const processor = postcss.plugin('postcss-modules-scope', function(options) {
const generateScopedName =
(options && options.generateScopedName) || processor.generateScopedName;

const exports = {};
let exports = Object.create(null);
// let exports = {};
Copy link
Member

Choose a reason for hiding this comment

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

Remove comment, and why don't use const?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

@alexander-akait alexander-akait merged commit cb11e64 into css-modules:master Nov 27, 2018
@cottom cottom deleted the hotfix/keyword-conflict branch November 28, 2018 07:10
@ISBN9527
Copy link

麻烦大佬合下代码!
image

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.

None yet

4 participants