From 4361f995dabbf8e35dad738f418a977275dea6ae Mon Sep 17 00:00:00 2001 From: Sergio Arbeo Date: Thu, 13 Jul 2017 19:29:02 +0200 Subject: [PATCH] [DOC release] Document the result of `hash` is an empty object. Fixes #14489 --- packages/ember-glimmer/lib/helpers/hash.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/ember-glimmer/lib/helpers/hash.js b/packages/ember-glimmer/lib/helpers/hash.js index aa990084ac9..f2330361d0d 100644 --- a/packages/ember-glimmer/lib/helpers/hash.js +++ b/packages/ember-glimmer/lib/helpers/hash.js @@ -23,6 +23,17 @@ Where the `title` is bound to updates of the `office` property. + Note that the hash is an empty object with no prototype chain, therefore + common methods like `toString` are not available in the resulting hash. + If you need to use such a method, you can use the `call` or `apply` + approach: + + ```js + function toString(obj) { + return Object.prototype.toString.apply(obj); + } + ``` + @method hash @for Ember.Templates.helpers @param {Object} options