From 19a1ebe78908d35e3c7f3eb13e29b8fd164f22fc Mon Sep 17 00:00:00 2001 From: Christopher Joe Date: Wed, 25 May 2016 12:11:46 +1200 Subject: [PATCH] add namespace for appBoot, and fix syntax error in GridField --- admin/client/src/boot/index.js | 4 +++- admin/client/src/components/GridField/GridField.js | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/admin/client/src/boot/index.js b/admin/client/src/boot/index.js index 2c4401677..30c89b1a1 100644 --- a/admin/client/src/boot/index.js +++ b/admin/client/src/boot/index.js @@ -45,4 +45,6 @@ function appBoot() { // Entwine hooks are being used to set up the . // `window.onload` happens AFTER these Entwine hooks which means // the store is undefined when the is constructed. -$('body').entwine({ onadd: () => appBoot() }); +$.entwine('ss', () => { + $('body').entwine({ onadd: () => appBoot() }); +}); diff --git a/admin/client/src/components/GridField/GridField.js b/admin/client/src/components/GridField/GridField.js index a5dd8af5d..7f0017242 100644 --- a/admin/client/src/components/GridField/GridField.js +++ b/admin/client/src/components/GridField/GridField.js @@ -11,6 +11,8 @@ import GridFieldAction from './GridFieldAction'; import FormConstants from 'components/Form/FormConstants'; import * as actions from 'state/records/RecordsActions'; +const NotYetLoaded = {}; + /** * The component acts as a container for a grid field, * with smarts around data retrieval from external sources. @@ -161,13 +163,11 @@ GridField.propTypes = { }), }; -const NotYetLoaded = {}; - function mapStateToProps(state, ownProps) { const recordType = ownProps.data ? ownProps.data.recordType : null; return { config: state.config, - records: recordType && state.records[recordType] ? state.records[recordType] : NotYetLoaded + records: recordType && state.records[recordType] ? state.records[recordType] : NotYetLoaded, }; }