Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Ember's Hash Object -- What is it?
Evaluating Hash Object
type: object
keys ["somekey"]
ember-metal.js:4067 TypeError: hashObj.hasOwnProperty is not a function
at Class.evaluateObject (component.js:63)
at Class.send (action_support.js:129)
at Class.superWrapper [as send] (ember-utils.js:423)
at action.js:141
at exports.flaggedInstrument (ember-metal.js:3876)
at action.js:140
at (backburner.js:474)
at run$1 (ember-metal.js:4407)
at ActionState.handler (action.js:120)
at HTMLDivElement.<anonymous> (event_dispatcher.js:222)
defaultDispatch @ ember-metal.js:4067
dispatchError @ ember-metal.js:4048
run @ backburner.js:476
run$1 @ ember-metal.js:4407
handler @ action.js:120
(anonymous) @ event_dispatcher.js:222
dispatch @ jquery.js:4670
elemData.handle @ jquery.js:4338
// ...
actions: {
evaluateObject(hashObj){"Evaluating Hash Object");
console.log("type: ", typeof hashObj);
console.log("keys", Object.keys(hashObj));
console.log("Has somekey?", hashObj.hasOwnProperty("somekey"));
// ...
<!-- ... -->
<div class="btn btn-info" {{action "evaluateObject" (hash somekey="someval")}}>
<!-- ... -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.