Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Commit

Permalink
Merge branch 'v7' of https://github.com/Financial-Times/n-ui into v7
Browse files Browse the repository at this point in the history
* 'v7' of https://github.com/Financial-Times/n-ui:
  no more circular mindfuck (#1107)
  • Loading branch information
wheresrhys committed Oct 18, 2017
2 parents 68168d3 + af14fb8 commit c9c65a3
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions browser/bundles/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@ import { AppInitializer } from '../js/app-initializer';

// returns {flags, allStylesLoaded, appInfo}
const app = new AppInitializer();
app.bootstrap(window.FT.nUiConfig || {
preset: 'discrete'
});

window.FT.nUi = Object.assign(app.env, {
window.FT.nUi = Object.assign({}, app.env, {
onAppInitialized: app.onAppInitialized,
ads: ads,
tracking: tracking,
Expand All @@ -35,3 +32,10 @@ window.FT.nUi = Object.assign(app.env, {
superstoreSync
}
});

// must be after the definition of window.ft.Nui as some subcomponents will
// depend on it
// TODO - see if webpack 3's dynamic imports can replace the above hack
app.bootstrap(window.FT.nUiConfig || {
preset: 'discrete'
});

0 comments on commit c9c65a3

Please sign in to comment.