From f182689c9018d1c0293613ae21588dbd819274e7 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Wed, 5 Aug 2015 19:20:49 +0930 Subject: [PATCH] Allow extension of functions that may not be defined --- js/lib/extend.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/lib/extend.js b/js/lib/extend.js index fe55c7012..96c2ce69e 100644 --- a/js/lib/extend.js +++ b/js/lib/extend.js @@ -22,7 +22,7 @@ export function extend(object, method, callback) { const original = object[method]; object[method] = function(...args) { - const value = original.apply(this, args); + const value = original ? original.apply(this, args) : undefined; callback.apply(this, [value].concat(args));