From 2b0c07c2e75fac23f894cbd5953914ad5cd8c773 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Sun, 29 Mar 2015 19:30:53 +1100 Subject: [PATCH] only push the initializer function if required --- .../transformation/templates/helper-create-decorated-class.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/babel/transformation/templates/helper-create-decorated-class.js b/src/babel/transformation/templates/helper-create-decorated-class.js index cab51157e0..8c36074cdb 100644 --- a/src/babel/transformation/templates/helper-create-decorated-class.js +++ b/src/babel/transformation/templates/helper-create-decorated-class.js @@ -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);