mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
add array check before iterating
This commit is contained in:
parent
d0316392f6
commit
314f73448a
@ -20,9 +20,12 @@ const prepare = (methods, dispatch) => {
|
|||||||
(e) => {
|
(e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
input.strategies.forEach((s) => {
|
if (Array.isArray(input.strategies)) {
|
||||||
delete s.id;
|
input.strategies.forEach((s) => {
|
||||||
});
|
delete s.id;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
createFeatureToggles(input)(dispatch)
|
createFeatureToggles(input)(dispatch)
|
||||||
.then(() => methods.clear())
|
.then(() => methods.clear())
|
||||||
|
@ -30,9 +30,11 @@ const prepare = (methods, dispatch) => {
|
|||||||
(e) => {
|
(e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
input.strategies.forEach((s) => {
|
if (Array.isArray(input.strategies)) {
|
||||||
delete s.id;
|
input.strategies.forEach((s) => {
|
||||||
});
|
delete s.id;
|
||||||
|
});
|
||||||
|
}
|
||||||
// TODO: should add error handling
|
// TODO: should add error handling
|
||||||
requestUpdateFeatureToggle(input)(dispatch)
|
requestUpdateFeatureToggle(input)(dispatch)
|
||||||
.then(() => methods.clear())
|
.then(() => methods.clear())
|
||||||
|
Loading…
Reference in New Issue
Block a user