redux-clerk2 2.0.26 → 2.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/reducers/remove.js +4 -0
- package/package.json +1 -1
- package/src/reducers/remove.js +4 -0
package/lib/reducers/remove.js
CHANGED
|
@@ -49,6 +49,7 @@ var start = exports.start = function start(state, action) {
|
|
|
49
49
|
map.get('instances').entrySeq().forEach(function (item) {
|
|
50
50
|
var instanceKey = item[0];
|
|
51
51
|
var instanceUids = item[1].get('data');
|
|
52
|
+
if (!instanceUids) return; // safety guard
|
|
52
53
|
var uidIndexInInstance = instanceUids.indexOf(removalId);
|
|
53
54
|
|
|
54
55
|
// If the uid of the item to be removed exists in this instance, remove it
|
|
@@ -88,6 +89,7 @@ var start = exports.start = function start(state, action) {
|
|
|
88
89
|
map.get('instances').entrySeq().forEach(function (item) {
|
|
89
90
|
var instanceKey = item[0];
|
|
90
91
|
var instanceUids = item[1].get('data');
|
|
92
|
+
if (!instanceUids) return; // safety guard
|
|
91
93
|
var uidIndexInInstance = instanceUids.indexOf(removalId);
|
|
92
94
|
|
|
93
95
|
// If the uid of the item to be removed exists in this instance, remove it
|
|
@@ -132,6 +134,7 @@ var success = exports.success = function success(state, action) {
|
|
|
132
134
|
map.get('instances').entrySeq().forEach(function (item) {
|
|
133
135
|
var instanceKey = item[0];
|
|
134
136
|
var instanceUids = item[1].get('data');
|
|
137
|
+
if (!instanceUids) return; // safety guard
|
|
135
138
|
var uidIndexInInstance = instanceUids.indexOf(removalId);
|
|
136
139
|
|
|
137
140
|
// If the uid of the item to be removed exists in this instance, remove it
|
|
@@ -169,6 +172,7 @@ var success = exports.success = function success(state, action) {
|
|
|
169
172
|
map.get('instances').entrySeq().forEach(function (item) {
|
|
170
173
|
var instanceKey = item[0];
|
|
171
174
|
var instanceUids = item[1].get('data');
|
|
175
|
+
if (!instanceUids) return; // safety guard
|
|
172
176
|
var uidIndexInInstance = instanceUids.indexOf(removalId);
|
|
173
177
|
|
|
174
178
|
// If the uid of the item to be removed exists in this instance, remove it
|
package/package.json
CHANGED
package/src/reducers/remove.js
CHANGED
|
@@ -36,6 +36,7 @@ export const start = (state, action) => {
|
|
|
36
36
|
map.get('instances').entrySeq().forEach(item => {
|
|
37
37
|
const instanceKey = item[0]
|
|
38
38
|
const instanceUids = item[1].get('data')
|
|
39
|
+
if (!instanceUids) return; // safety guard
|
|
39
40
|
const uidIndexInInstance = instanceUids.indexOf(removalId)
|
|
40
41
|
|
|
41
42
|
// If the uid of the item to be removed exists in this instance, remove it
|
|
@@ -77,6 +78,7 @@ export const start = (state, action) => {
|
|
|
77
78
|
map.get('instances').entrySeq().forEach(item => {
|
|
78
79
|
const instanceKey = item[0]
|
|
79
80
|
const instanceUids = item[1].get('data')
|
|
81
|
+
if (!instanceUids) return; // safety guard
|
|
80
82
|
const uidIndexInInstance = instanceUids.indexOf(removalId)
|
|
81
83
|
|
|
82
84
|
// If the uid of the item to be removed exists in this instance, remove it
|
|
@@ -123,6 +125,7 @@ export const success = (state, action) => {
|
|
|
123
125
|
map.get('instances').entrySeq().forEach(item => {
|
|
124
126
|
const instanceKey = item[0]
|
|
125
127
|
const instanceUids = item[1].get('data')
|
|
128
|
+
if (!instanceUids) return; // safety guard
|
|
126
129
|
const uidIndexInInstance = instanceUids.indexOf(removalId)
|
|
127
130
|
|
|
128
131
|
// If the uid of the item to be removed exists in this instance, remove it
|
|
@@ -164,6 +167,7 @@ export const success = (state, action) => {
|
|
|
164
167
|
map.get('instances').entrySeq().forEach(item => {
|
|
165
168
|
const instanceKey = item[0]
|
|
166
169
|
const instanceUids = item[1].get('data')
|
|
170
|
+
if (!instanceUids) return; // safety guard
|
|
167
171
|
const uidIndexInInstance = instanceUids.indexOf(removalId)
|
|
168
172
|
|
|
169
173
|
// If the uid of the item to be removed exists in this instance, remove it
|