Skip to content

Commit

Permalink
storybookjs#3780: Do not display wrong warning when loading ".js" or …
Browse files Browse the repository at this point in the history
…".json"
  • Loading branch information
BR0kEN- committed Aug 23, 2018
1 parent 5754cc7 commit 1257285
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/core/src/server/serverRequire.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export default function serverRequire(filePath) {

const moduleDescriptor = interpret.extensions[candidateExt];

if (registerCompiler(moduleDescriptor) === 0) {
if (moduleDescriptor !== null && registerCompiler(moduleDescriptor) === 0) {
logger.warn(`=> File ${candidatePath} is detected`);
logger.warn(` but impossible to import loader for ${candidateExt}`);

Expand Down

0 comments on commit 1257285

Please sign in to comment.