Skip to content

Commit ee8aedd

Browse files
rafecafacebook-github-bot
authored andcommitted
Make Module.getName() synchronous
Reviewed By: cpojer Differential Revision: D5911221 fbshipit-source-id: 2381d70008adff9e0f7613fe43c8fb562222acd6
1 parent 43d394c commit ee8aedd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

local-cli/server/util/attachHMRServer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ type HMROptions<TModule> = {
6767
};
6868

6969
type Moduleish = {
70-
getName(): Promise<string>,
70+
getName(): string,
7171
isAsset(): boolean,
7272
isJSON(): boolean,
7373
path: string,
@@ -135,7 +135,7 @@ function attachHMRServer<TModule: Moduleish>(
135135
name?: string,
136136
deps: Array<string>,
137137
}> = await Promise.all(response.dependencies.map(async (dep: TModule) => {
138-
const depName = await dep.getName();
138+
const depName = dep.getName();
139139

140140
if (dep.isAsset() || dep.isJSON()) {
141141
return {path: dep.path, deps: []};

0 commit comments

Comments
 (0)