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
This commit is contained in:
Leon 2016-06-23 03:06:58 -07:00 committed by Facebook Github Bot 4
parent 7fc51c8cea
commit 57d85f1c3e
1 changed files with 1 additions and 1 deletions

View File

@ -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.`;