From 57d85f1c3e2abcac9d647acd52b150650df596cc Mon Sep 17 00:00:00 2001 From: Leon Date: Thu, 23 Jun 2016 03:06:58 -0700 Subject: [PATCH] Fixing Syntax Error "errorMessage" is read-only Summary: Changed const to let, to dodge the following issue: > "errorMessage" is read-only > 203 | const errorMessage = `Callback with id ${cbID}: ${module}.${method}() not found`; > 204 | if (method) { > > 205 | errorMessage = `The callback ${method}() exists in module ${module}, ` > | ^ > 206 | + `but only one callback may be registered to a function in a native module.`; > 207 | } Closes https://github.com/facebook/react-native/pull/8347 Differential Revision: D3475525 Pulled By: javache fbshipit-source-id: e03b3b3411606e6798dc42c785f847c2eda03b0c --- Libraries/Utilities/MessageQueue.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/Utilities/MessageQueue.js b/Libraries/Utilities/MessageQueue.js index 8b15a8eddfe..cc24f575201 100644 --- a/Libraries/Utilities/MessageQueue.js +++ b/Libraries/Utilities/MessageQueue.js @@ -202,7 +202,7 @@ class MessageQueue { const module = debug && this._remoteModuleTable[debug[0]]; const method = debug && this._remoteMethodTable[debug[0]][debug[1]]; if (!callback) { - const errorMessage = `Callback with id ${cbID}: ${module}.${method}() not found`; + let errorMessage = `Callback with id ${cbID}: ${module}.${method}() not found`; if (method) { errorMessage = `The callback ${method}() exists in module ${module}, ` + `but only one callback may be registered to a function in a native module.`;