Skip to content

Commit 74b32e2

Browse files
committed
fix: right-hand side of 'in' when no require
1 parent 1f6d53c commit 74b32e2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/utils/requireAtRuntime.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* Return module from a given map (like {app: require('app')}) or throw.
33
*/
44
export default function requireAtRuntime(requires, filepath) {
5+
requires = requires || {};
56
if (!(filepath in requires)) {
67
throw new Error(
78
"import or require() statements can be added only by setting it using the requires prop"

0 commit comments

Comments
 (0)