use cross-env for cd and make sure values are specified
This commit is contained in:
parent
0eb6067ddf
commit
43030980b1
|
@ -130,7 +130,7 @@ function entities(state = entitiesDefaultState, action) {
|
|||
if (action[name] && action[name].length === 1) {
|
||||
let entity = action[name][0];
|
||||
let nested = Object.keys(state).reduce((acc, entityName) => {
|
||||
if (entity[entityName] && entity[entityName].length > 0) {
|
||||
if (entity && entity[entityName] && entity[entityName].length > 0) {
|
||||
let entityFilter = filtrer[entityName] || (() => true);
|
||||
let entitySort = sorter[entityName] || (() => true);
|
||||
acc[entityName] = [...entity[entityName], ...state[entityName]].sort(entitySort).filter(entityFilter);
|
||||
|
@ -156,7 +156,7 @@ function errorEntities(state = {}, action) {
|
|||
}
|
||||
let newState = {};
|
||||
for (let name of Object.keys(entitiesDefaultState)) {
|
||||
if (action[name] && action[name].length > 0) {
|
||||
if (action[name] && action[name].length > 0 && action[name][0]) {
|
||||
newState[name] = action[name][0].error;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
"test:test_app": "cross-env DAPP=\"test_app\" npm run test_dapp",
|
||||
"test:contracts_app": "cross-env DAPP=\"contracts_app\" npm run test_dapp",
|
||||
"test_dapp": "cross-env-shell \"cd test_apps/$DAPP && npm install && npm test\"",
|
||||
"prepublish": "cd embark-ui && npm install && npm run build && cd -"
|
||||
"prepublish": "cross-env cd embark-ui && npm install && cd -"
|
||||
},
|
||||
"bin": {
|
||||
"embark": "./bin/embark"
|
||||
|
|
Loading…
Reference in New Issue