diff --git a/lib/AppContext.js b/lib/AppContext.js index 74bce520..8089f778 100644 --- a/lib/AppContext.js +++ b/lib/AppContext.js @@ -607,11 +607,11 @@ export default class AppContext { }; context.setDataHarmonizers(dhs); - if (!!context.oneToManyAppContext) { + if (context.oneToManyAppContext) { context.oneToManyAppContext.destroy(); } const appContext = buildAppContext(schema); - context.oneToManyAppContext = setup1M(appContext, dhs); // returns an event manager + context.oneToManyAppContext = setup1M(appContext, dhs); // returns an event manager return context; }); diff --git a/package.json b/package.json index fd181576..c5471e46 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "build:lib": "yarn clean:lib && rollup --config lib/rollup.config.js", "build:web": "yarn clean:web && webpack --mode=production --config web/webpack.config.js", "dev": "webpack serve --mode=development --config web/webpack.config.js", - "flightcheck": "yarn format && yarn lint && yarn test", + "flightcheck": "yarn format && yarn lint ; yarn test", "test": "jest tests/" }, "peerDependencies": {