Browse files

fix comment and regex

Enyo-DCO-1.1-Signed-off-by: Cole Davis <cole.davis@lge.com>
  • Loading branch information...
1 parent c848205 commit 72232ca759bdd80190c61fedc5e56adf85c71cde @clinuz clinuz committed Mar 27, 2013
Showing with 3 additions and 4 deletions.
  1. +3 −4 source/kernel/Object.js
View
7 source/kernel/Object.js
@@ -183,19 +183,18 @@ enyo.Object.publish = function(ctor, props) {
/**
We need to find special cases and ensure that the overloaded
getter of a published property of a parent kind is flagged for
- the global getter.
+ the global getter and setter.
*/
enyo.Object.overload = function (ctor, props) {
var proto = ctor.prototype.base? ctor.prototype.base.prototype: {};
- var regex = /(get|set).*/;
+ var regex = /^(get|set).*/;
var name;
var prop;
- var base;
for (name in props) {
if (!regex.test(name)) continue;
prop = props[name];
if ("function" === typeof prop) {
- if ((base = proto[name])) {
+ if (proto[name]) {
prop.overloaded = true;
}
}

0 comments on commit 72232ca

Please sign in to comment.