Permalink
Browse files

critical fix for getter/setter

Enyo-DCO-1.1-Signed-off-by: Cole Davis <cole.davis@lge.com>
  • Loading branch information...
1 parent 8c43f37 commit 877ff6238066f1c389d6ab63e9b6165064c1cc08 @clinuz clinuz committed Mar 27, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 source/kernel/lang.js
@@ -120,7 +120,7 @@
part = path.substring(0, idx);
path = path.slice(idx+1);
- if ("object" === typeof cur[part]) {
+ if (typeof cur[part] in {"object":"","function":""}) {
if (cur[part]._is_object) {
return cur[part].get(path);
} else {
@@ -204,7 +204,7 @@
} else {
// we update our current reference context and if it does
// not exist at the requested path it will be created
- if ("object" !== typeof cur[target]) cur[target] = {};
+ if (!(typeof cur[target] in {"object":"","function":""})) cur[target] = {};
if (true === cur[target]._is_object) {
return cur[target].set(parts.join("."), value);
}

0 comments on commit 877ff62

Please sign in to comment.