mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Change error wording to remove "Promise elements"
This commit is contained in:
+1
-1
@@ -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.',
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user