Change error wording to remove "Promise elements"

This commit is contained in:
Dan Abramov
2018-11-21 18:19:47 +00:00
parent 7af78282f1
commit 403d2ca028
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -844,7 +844,7 @@ function mountLazyComponent(
invariant(
false,
'Element type is invalid. Received a promise that resolves to: %s. ' +
'Promise elements must resolve to a class or function.',
'Lazy element type must resolve to a class or function.',
Component,
);
}
@@ -538,7 +538,7 @@ describe('ReactLazy', () => {
root.unstable_flushAll();
}).toThrow(
'Element type is invalid. Received a promise that resolves to: [object Object]. ' +
'Promise elements must resolve to a class or function.',
'Lazy element type must resolve to a class or function.',
);
});