Unverified Commit 77c05f75 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

[flutter_tools] check if requireloader is defined (#55085)

parent f57197ad
...@@ -62,20 +62,22 @@ define("main_module.bootstrap", ["$entrypoint", "dart_sdk"], function(app, dart_ ...@@ -62,20 +62,22 @@ define("main_module.bootstrap", ["$entrypoint", "dart_sdk"], function(app, dart_
/* MAIN_EXTENSION_MARKER */ /* MAIN_EXTENSION_MARKER */
child.main(); child.main();
window.\$dartLoader = {}; window.\$dartLoader = {};
window.\$dartLoader.rootDirectories = []; window.\$dartLoader.rootDirectories = [];
window.\$requireLoader.getModuleLibraries = dart_sdk.dart.getModuleLibraries; if (window.\$requireLoader) {
if (window.\$dartStackTraceUtility && !window.\$dartStackTraceUtility.ready) { window.\$requireLoader.getModuleLibraries = dart_sdk.dart.getModuleLibraries;
window.\$dartStackTraceUtility.ready = true; if (window.\$dartStackTraceUtility && !window.\$dartStackTraceUtility.ready) {
let dart = dart_sdk.dart; window.\$dartStackTraceUtility.ready = true;
window.\$dartStackTraceUtility.setSourceMapProvider(function(url) { let dart = dart_sdk.dart;
url = url.replace(window.\$dartUriBase + '/', ''); window.\$dartStackTraceUtility.setSourceMapProvider(function(url) {
if (url == 'dart_sdk.js') { url = url.replace(window.\$dartUriBase + '/', '');
return dart.getSourceMap('dart_sdk'); if (url == 'dart_sdk.js') {
} return dart.getSourceMap('dart_sdk');
url = url.replace(".lib.js", ""); }
return dart.getSourceMap(url); url = url.replace(".lib.js", "");
}); return dart.getSourceMap(url);
});
}
} }
}); });
'''; ''';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment