From 207677fabf256108fd55b2fc0e38fcf3f60fe04f Mon Sep 17 00:00:00 2001 From: mehwar Date: Mon, 30 Nov 2015 19:02:42 -0500 Subject: [PATCH] Fix SyntaxErrors in compound expressions The additional parentheses eliminate SyntaxErrors similar to Appendix A that surface when running the default React Native iOS app with Node v5.1. Appendix A ![iOS simulator SyntaxError screenshot](http://i.snag.gy/po7Fi.jpg "SyntaxError") --- core/path.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/path.js b/core/path.js index 2203a91..92e54ff 100644 --- a/core/path.js +++ b/core/path.js @@ -95,8 +95,8 @@ module.exports = Class({ if (ex == null){ this._pivotX = +c1x; this._pivotY = +c1y; ex = +c2x; ey = +c2y; - c2x = (ex + (+c1x) * 2) / 3; c2y = (ey + (+c1y) * 2) / 3; - c1x = (x + (+c1x) * 2) / 3; c1y = (y + (+c1y) * 2) / 3; + c2x = ((ex + (+c1x)) * 2) / 3; c2y = ((ey + (+c1y)) * 2) / 3; + c1x = ((x + (+c1x)) * 2) / 3; c1y = ((y + (+c1y)) * 2) / 3; } else { this._pivotX = +c2x; this._pivotY = +c2y; } @@ -279,4 +279,4 @@ module.exports = Class({ this.onLine(sx, sy, ex, ey); } -}); \ No newline at end of file +});