Skip to content

Commit 0d005af

Browse files
lbogdanCompuIves
authored andcommitted
Vue style-compiler: fixed un-rejectable promise. (codesandbox#242)
1 parent 8f077cb commit 0d005af

File tree

1 file changed

+3
-2
lines changed
  • src/sandbox/eval/transpilers/vue/style-compiler

1 file changed

+3
-2
lines changed

src/sandbox/eval/transpilers/vue/style-compiler/loader.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import trim from './plugins/trim';
66
import scopeId from './plugins/scope-id';
77

88
export default function(code: string, loaderContext: LoaderContext) {
9-
return new Promise(resolve => {
9+
return new Promise((resolve, reject) => {
1010
const query = loaderContext.options;
1111

1212
let vueOptions = loaderContext.options.__vueOptions__;
@@ -61,6 +61,7 @@ export default function(code: string, loaderContext: LoaderContext) {
6161
resolve({ transpiledCode: result.css, sourceMap: map });
6262

6363
return null; // silence bluebird warning
64-
});
64+
})
65+
.catch(err => reject(err));
6566
});
6667
}

0 commit comments

Comments
 (0)