From bca88eeb9ec6c96aab7cc6c6f3e9d245ee527e17 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Thu, 27 Oct 2016 08:47:09 -0400 Subject: [PATCH] [BUGFIX lts-2-8] Fix JSHint issue with referencing `Symbol`. The guard for using `Symbol` should not have been setup this way (`let Symbol = Symbol || null` will never be defined AFAICT since the transpilation would use `var` which hoists). Either way, there is no need for the local `Symbol` variable since we can just check if it is defined as the guard. --- packages/ember-metal/tests/utils_test.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/ember-metal/tests/utils_test.js b/packages/ember-metal/tests/utils_test.js index 8802eb63685..17796cc3be4 100644 --- a/packages/ember-metal/tests/utils_test.js +++ b/packages/ember-metal/tests/utils_test.js @@ -8,11 +8,7 @@ import { QUnit.module('Ember Metal Utils'); QUnit.test('inspect outputs the toString() representation of Symbols', function() { - // Symbol is not defined on pre-ES2015 runtimes, so this let's us safely test - // for it's existence (where a simple `if (Symbol)` would ReferenceError) - let Symbol = Symbol || null; - - if (Symbol) { + if (typeof Symbol !== 'undefined') { let symbol = Symbol('test'); equal(inspect(symbol), 'Symbol(test)'); } else {