mirror of
https://github.com/flarum/core.git
synced 2025-07-30 21:20:24 +02:00
Use System.get instead of System.import
Means we get drop Promise polyfill
This commit is contained in:
@@ -26,26 +26,23 @@
|
||||
@endforeach
|
||||
|
||||
<script>
|
||||
var app;
|
||||
System.import('flarum/app').then(function(module) {
|
||||
try {
|
||||
app = module.default;
|
||||
app.preload = {
|
||||
data: {!! json_encode($data) !!},
|
||||
document: {!! json_encode($document) !!},
|
||||
session: {!! json_encode($session) !!}
|
||||
};
|
||||
try {
|
||||
var app = System.get('flarum/app').default;
|
||||
app.preload = {
|
||||
data: {!! json_encode($data) !!},
|
||||
document: {!! json_encode($document) !!},
|
||||
session: {!! json_encode($session) !!}
|
||||
};
|
||||
|
||||
@foreach ($bootstrappers as $bootstrapper)
|
||||
System.import('{{ $bootstrapper }}');
|
||||
@endforeach
|
||||
@foreach ($bootstrappers as $bootstrapper)
|
||||
System.import('{{ $bootstrapper }}');
|
||||
@endforeach
|
||||
|
||||
app.boot();
|
||||
} catch (e) {
|
||||
document.write('<div class="container">Something went wrong.</div>');
|
||||
throw e;
|
||||
}
|
||||
});
|
||||
app.boot();
|
||||
} catch (e) {
|
||||
document.write('<div class="container">Something went wrong.</div>');
|
||||
throw e;
|
||||
}
|
||||
</script>
|
||||
|
||||
@if ($content)
|
||||
|
Reference in New Issue
Block a user