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

#3780: Do not display wrong warning when loading ".js" or ".json" #4060

Merged
merged 2 commits into from
Aug 24, 2018

Conversation

BR0kEN-
Copy link
Contributor

@BR0kEN- BR0kEN- commented Aug 23, 2018

Issue: #3780
Description: #3780 (comment)

@@ -84,7 +84,7 @@ export default function serverRequire(filePath) {

const moduleDescriptor = interpret.extensions[candidateExt];

if (registerCompiler(moduleDescriptor) === 0) {
if (moduleDescriptor !== null && registerCompiler(moduleDescriptor) === 0) {
Copy link
Member

Choose a reason for hiding this comment

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

So, is the problem only with a .json? because there is already a check ☝️ for .js.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, you are right. My proposition to not show the warning when moduleDescriptor is undefined (no key in interpret.extensions) or null (as for .js and .json).

@codecov
Copy link

codecov bot commented Aug 23, 2018

Codecov Report

Merging #4060 into master will increase coverage by 0.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4060      +/-   ##
==========================================
+ Coverage   40.22%   40.24%   +0.01%     
==========================================
  Files         467      467              
  Lines        5638     5636       -2     
  Branches      748      747       -1     
==========================================
  Hits         2268     2268              
+ Misses       2994     2993       -1     
+ Partials      376      375       -1
Impacted Files Coverage Δ
lib/core/src/server/serverRequire.js 0% <0%> (ø) ⬆️

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 887d64b...16fd089. Read the comment docs.

Copy link
Member

@igor-dv igor-dv left a comment

Choose a reason for hiding this comment

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

Thanks. we are having some troubles with CI, once it fixed I will merge.

@igor-dv
Copy link
Member

igor-dv commented Aug 24, 2018

Can you please merge from master?

@BR0kEN-
Copy link
Contributor Author

BR0kEN- commented Aug 24, 2018

Done. Let's wait for the builds.

@igor-dv igor-dv merged commit 98b3d90 into storybookjs:master Aug 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants