Skip to content

Commit 57d85f1

Browse files
K-LeonFacebook Github Bot 4
authored andcommitted
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 #8347 Differential Revision: D3475525 Pulled By: javache fbshipit-source-id: e03b3b3411606e6798dc42c785f847c2eda03b0c
1 parent 7fc51c8 commit 57d85f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Libraries/Utilities/MessageQueue.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ class MessageQueue {
202202
const module = debug && this._remoteModuleTable[debug[0]];
203203
const method = debug && this._remoteMethodTable[debug[0]][debug[1]];
204204
if (!callback) {
205-
const errorMessage = `Callback with id ${cbID}: ${module}.${method}() not found`;
205+
let errorMessage = `Callback with id ${cbID}: ${module}.${method}() not found`;
206206
if (method) {
207207
errorMessage = `The callback ${method}() exists in module ${module}, `
208208
+ `but only one callback may be registered to a function in a native module.`;

0 commit comments

Comments
 (0)