only push the initializer function if required

This commit is contained in:
Sebastian McKenzie 2015-03-29 19:30:53 +11:00
parent e27e7facac
commit 2b0c07c2e7

View File

@ -23,7 +23,7 @@
throw new TypeError("The decorator for method " + descriptor.key + " is of the invalid type " + typeof decorator);
}
}
initializers[key] = descriptor.initializer;
if (initializers) initializers[key] = descriptor.initializer;
}
Object.defineProperty(target, key, descriptor);