mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
Fixed loading of react editor in production
no issue - replaced use of `GhostAdmin` global when it doesn't exist in production by using the `Ember` global and picking the correct namespace
This commit is contained in:
parent
fd0398d5e2
commit
bd194f4ccc
1 changed files with 1 additions and 1 deletions
|
@ -1,4 +1,3 @@
|
|||
/* global GhostAdmin */
|
||||
import React, {Suspense} from 'react';
|
||||
|
||||
class ErrorHandler extends React.Component {
|
||||
|
@ -33,6 +32,7 @@ const fetchKoenig = function () {
|
|||
// the removal of `https://` and it's manual addition to the import template string is
|
||||
// required to work around ember-auto-import complaining about an unknown dynamic import
|
||||
// during the build step
|
||||
const GhostAdmin = window.Ember.Namespace.NAMESPACES.find(ns => ns.name === 'ghost-admin');
|
||||
const url = GhostAdmin.__container__.lookup('service:config').get('editor.url').replace('https://', '');
|
||||
await import(`https://${url}`);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue