Skip to content

Commit 911bf6d

Browse files
committed
Run flow even if init failed
1 parent 4ed28fd commit 911bf6d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/react-dev-utils/FlowTypecheckPlugin.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,13 +184,14 @@ FlowTypecheckPlugin.prototype.apply = function(compiler) {
184184
flowInitializationPromise = initializeFlow(
185185
compiler.options.context, this.flowconfig, this.otherFlowTypedDefs
186186
)
187-
.then(() => {
188-
flowInitialized = true;
189-
}, (e) => {
187+
.catch(e => {
190188
loaderContext.emitWarning(new Error(
191189
'Flow project initialization warning:\n' +
192190
e.message
193191
));
192+
})
193+
.then(() => {
194+
flowInitialized = true;
194195
});
195196
flowActiveOnProject = true;
196197
}

0 commit comments

Comments
 (0)