From d4eb8201f17e84609f392b9e917d1b8607da95f4 Mon Sep 17 00:00:00 2001 From: Jeff Morrison Date: Mon, 26 Oct 2015 09:17:50 -0700 Subject: [PATCH] Deploy Flow 0.18.1 to fbobjc Reviewed By: gabelevi Differential Revision: D2575778 fb-gh-sync-id: 2cf610959db6a493d1813455b17f66bc997a9ef3 --- .flowconfig | 6 +++--- Libraries/Animated/src/Interpolation.js | 9 +++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.flowconfig b/.flowconfig index 75c8ac2ac..d69edd940 100644 --- a/.flowconfig +++ b/.flowconfig @@ -43,9 +43,9 @@ suppress_type=$FlowIssue suppress_type=$FlowFixMe suppress_type=$FixMe -suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(1[0-7]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) -suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(1[0-7]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)? #[0-9]+ +suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(1[0-8]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) +suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(1[0-8]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)? #[0-9]+ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy [version] -0.17.0 +0.18.1 diff --git a/Libraries/Animated/src/Interpolation.js b/Libraries/Animated/src/Interpolation.js index dcb62ab70..da9671316 100644 --- a/Libraries/Animated/src/Interpolation.js +++ b/Libraries/Animated/src/Interpolation.js @@ -202,13 +202,22 @@ function createInterpolationFromStringOutputRange( // [200, 250], // [0, 0.5], // ] + /* $FlowFixMe(>=0.18.0): `outputRange[0].match()` can return `null`. Need to + * guard against this possibility. + */ var outputRanges = outputRange[0].match(stringShapeRegex).map(() => []); outputRange.forEach(value => { + /* $FlowFixMe(>=0.18.0): `value.match()` can return `null`. Need to guard + * against this possibility. + */ value.match(stringShapeRegex).forEach((number, i) => { outputRanges[i].push(+number); }); }); + /* $FlowFixMe(>=0.18.0): `outputRange[0].match()` can return `null`. Need to + * guard against this possibility. + */ var interpolations = outputRange[0].match(stringShapeRegex).map((value, i) => { return Interpolation.create({ ...config,