From 5a89ed1c78c7e20dbe6bceb7dcc7a6f2e9118f71 Mon Sep 17 00:00:00 2001 From: Tom Chen Date: Sun, 16 Nov 2014 12:35:18 +0800 Subject: [PATCH] fix(expose_getters_from): should iterate all keys in prototype chain --- src/helpers/expose_getters_from.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/helpers/expose_getters_from.js b/src/helpers/expose_getters_from.js index bcad9ac8..2d67b7a3 100644 --- a/src/helpers/expose_getters_from.js +++ b/src/helpers/expose_getters_from.js @@ -1,9 +1,9 @@ "use strict"; module.exports = function (component, prototype, instance) { - Object.keys(prototype).forEach(function (key) { + for (var key in prototype) { if (key.match(/^get/) && !key.match(/Map$/)) { component[key] = instance[key].bind(instance); } - }); + } };