From d00b6a8e7be327c2d9d3e3edb00e9b2a5b9eebad Mon Sep 17 00:00:00 2001 From: Daniel Cestari Date: Thu, 19 Nov 2015 17:14:26 +0200 Subject: [PATCH] Replace "for..of" with simple "forEach" Apparently there are some issues with this: https://github.com/facebook/react-native/issues/1499 --- Experiment.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Experiment.js b/Experiment.js index 27e3eca..dde89a6 100644 --- a/Experiment.js +++ b/Experiment.js @@ -14,11 +14,11 @@ var Experiment = React.createClass({ if (!Array.isArray(children) || children.length < 2) { return new Error('You must have at least 2 Variants.'); } - for (child of children) { + children.forEach((child) => { if (!child.type.prototype.isVariant) { return new Error('One or more children is not a Variant.'); } - } + }); }), choose: PropTypes.func, onChoice: PropTypes.func,