Skip to content
This repository was archived by the owner on Feb 12, 2025. It is now read-only.

Commit 7af7c2c

Browse files
committed
Ensure flutter.js can be defined after the _flutter namespace exists.
1 parent 05225c1 commit 7af7c2c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/web_ui/dev/test_platform.dart

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,13 +554,19 @@ class BrowserPlatform extends PlatformPlugin {
554554
(CompileConfiguration config) => _makeBuildConfigString(scriptBase, config)
555555
).join(',\n');
556556
final String bootstrapScript = '''
557-
<script src="/flutter_js/flutter.js"></script>
558557
<script>
558+
// Define this before flutter.js to test PR flutter/engine#51294
559+
if (_flutter == null) {
560+
_flutter = {};
561+
}
559562
_flutter.buildConfig = {
560563
builds: [
561564
$buildConfigsString
562565
]
563566
};
567+
</script>
568+
<script src="/flutter_js/flutter.js"></script>
569+
<script>
564570
_flutter.loader.load({
565571
config: {
566572
canvasKitBaseUrl: "/canvaskit/",

0 commit comments

Comments
 (0)