Permalink
Browse files

Merge pull request #251 from clinuz/master

Post-2.2 critical fix

Reviewed-By: Ben Combee (ben.combee@lge.com)
  • Loading branch information...
2 parents e57fd19 + cba4297 commit b1016f8e28ae1319e6d98e5da24f9e4600570d0c @unwiredben unwiredben committed Mar 27, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 source/kernel/lang.js
View
@@ -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 b1016f8

Please sign in to comment.