Skip to content

Commit

Permalink
use HAS_NATIVE_SYMBOL consistently
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Garrett committed Feb 8, 2019
1 parent 47edf3d commit 0fe6002
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { set, computed } from '@ember/-internals/metal';
import { getDebugFunction, setDebugFunction } from '@ember/debug';
import { readOnly } from '@ember/object/computed';
import { Object as EmberObject, ObjectProxy } from '@ember/-internals/runtime';
import { HAS_NATIVE_SYMBOL } from '@ember/-internals/utils';
import { constructStyleDeprecationMessage } from '@ember/-internals/views';
import { Component, SafeString, htmlSafe } from '../utils/helpers';

Expand Down Expand Up @@ -682,7 +683,7 @@ let GlimmerContentTestCases = new ContentTestGenerator([
[Object.create(null), EMPTY, 'an object with no toString'],
]);

if (typeof Symbol !== 'undefined') {
if (HAS_NATIVE_SYMBOL) {
GlimmerContentTestCases.cases.push([Symbol('debug'), 'Symbol(debug)', 'a symbol']);
}

Expand Down
4 changes: 2 additions & 2 deletions packages/@ember/-internals/utils/tests/guid_for_test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { guidFor } from '..';
import { guidFor, HAS_NATIVE_SYMBOL } from '..';
import { moduleFor, AbstractTestCase as TestCase } from 'internal-test-helpers';

function sameGuid(assert, a, b, message) {
Expand Down Expand Up @@ -49,7 +49,7 @@ moduleFor(
}

['@test symbols'](assert) {
if (typeof Symbol === 'undefined') {
if (HAS_NATIVE_SYMBOL) {
assert.ok(true, 'symbols are not supported on this browser');
return;
}
Expand Down

0 comments on commit 0fe6002

Please sign in to comment.