From 42f50049ff29ccdc484c22f8a5a19cda2dd03a5b Mon Sep 17 00:00:00 2001 From: kibigo! Date: Wed, 3 Jan 2018 12:36:21 -0800 Subject: WIP Refactor; 1000 tiny edits --- app/javascript/flavours/glitch/util/react_helpers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/javascript/flavours/glitch/util/react_helpers.js') diff --git a/app/javascript/flavours/glitch/util/react_helpers.js b/app/javascript/flavours/glitch/util/react_helpers.js index 087e3969d..082a58e62 100644 --- a/app/javascript/flavours/glitch/util/react_helpers.js +++ b/app/javascript/flavours/glitch/util/react_helpers.js @@ -6,8 +6,8 @@ export function assignHandlers (target, handlers) { // We just bind each handler to the `target`. const handle = target.handlers = {}; - handlers.keys().forEach( - key => handle.key = key.bind(target) + Object.keys(handlers).forEach( + key => handle[key] = handlers[key].bind(target) ); } -- cgit