mirror of
https://github.com/GoogleChrome/chrome-extensions-samples.git
synced 2026-03-26 13:19:49 +07:00
Fix: use let to prevent reassignment error for sandbox result (#1067)
In the sandbox/sandbox example, a variable `result` is created as a const, but it's attempted to be reassigned later in the code. This changeset just changes the `result` variable to be a reassignable variable instead.
This commit is contained in:
@@ -57,8 +57,8 @@ limitations under the License.
|
||||
// Set up message event handler:
|
||||
window.addEventListener('message', function (event) {
|
||||
const command = event.data.command;
|
||||
const template = templates[event.data.templateName],
|
||||
result = 'invalid request';
|
||||
const template = templates[event.data.templateName];
|
||||
let result = 'invalid request';
|
||||
|
||||
// if we don't know the templateName requested, return an error message
|
||||
if (template) {
|
||||
|
||||
Reference in New Issue
Block a user