diff --git a/packages/@ember/-internals/glimmer/lib/helpers/mut.ts b/packages/@ember/-internals/glimmer/lib/helpers/mut.ts index 019e7e3ac4b..9b7d5f91b61 100644 --- a/packages/@ember/-internals/glimmer/lib/helpers/mut.ts +++ b/packages/@ember/-internals/glimmer/lib/helpers/mut.ts @@ -139,7 +139,7 @@ export default function(args: VMArguments, vm: VM) { // // This message is alright for the first case, but could be quite // confusing for the second case. - assert('You can only pass a path to mut', UPDATE_REFERENCED_VALUE in rawRef); + assert('You can only pass a path to mut', rawRef[UPDATE_REFERENCED_VALUE] !== undefined); return new MutReference(rawRef, vm.env); } diff --git a/packages/@ember/-internals/glimmer/lib/utils/iterator.ts b/packages/@ember/-internals/glimmer/lib/utils/iterator.ts index 2b3d267ba3f..7b6bbb67fc9 100644 --- a/packages/@ember/-internals/glimmer/lib/utils/iterator.ts +++ b/packages/@ember/-internals/glimmer/lib/utils/iterator.ts @@ -150,7 +150,8 @@ class ObjectIterator extends BoundedIterator { let length = 0; let isMapLike = false; - obj.forEach((value: unknown, key: unknown) => { + // Not using an arrow function here so we can get an accurate `arguments` + obj.forEach(function (value: unknown, key: unknown) { isMapLike = isMapLike || arguments.length >= 2; if (isMapLike) { diff --git a/packages/@ember/-internals/glimmer/tests/integration/helpers/tracked-test.js b/packages/@ember/-internals/glimmer/tests/integration/helpers/tracked-test.js index 23e5e077950..fe81f543951 100644 --- a/packages/@ember/-internals/glimmer/tests/integration/helpers/tracked-test.js +++ b/packages/@ember/-internals/glimmer/tests/integration/helpers/tracked-test.js @@ -353,7 +353,7 @@ moduleFor( }); let expectedMessage = backtrackingMessageFor('name', '\\(unknown object\\)', { - renderTree: ['\\(result of a `helloWorld` helper\\)'], + renderTree: ['\\(result of a `.*` helper\\)'], }); expectDeprecation(() => { diff --git a/yarn.lock b/yarn.lock index 494062ff8d1..d777f096883 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4447,18 +4447,7 @@ growly@^1.3.0: resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= -handlebars@^4.0.11, handlebars@^4.0.4, handlebars@^4.0.6: - version "4.5.3" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.5.3.tgz#5cf75bd8714f7605713511a56be7c349becb0482" - integrity sha512-3yPecJoJHK/4c6aZhSvxOyG4vJKDshV36VHp0iVCDVh7o9w2vwi3NSnL2MMPj3YdduqaBcu7cGbggJQM0br9xA== - dependencies: - neo-async "^2.6.0" - optimist "^0.6.1" - source-map "^0.6.1" - optionalDependencies: - uglify-js "^3.1.4" - -handlebars@^4.5.1: +handlebars@^4.0.11, handlebars@^4.0.4, handlebars@^4.5.1: version "4.5.3" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.5.3.tgz#5cf75bd8714f7605713511a56be7c349becb0482" integrity sha512-3yPecJoJHK/4c6aZhSvxOyG4vJKDshV36VHp0iVCDVh7o9w2vwi3NSnL2MMPj3YdduqaBcu7cGbggJQM0br9xA==