From 2dbe2fc5a329334b9f61ed10b3fb4d93a2fea4b6 Mon Sep 17 00:00:00 2001 From: JC Brand Date: Wed, 9 Mar 2016 08:39:04 +0000 Subject: [PATCH] Bugfix. Need to set the context when calling a _super method --- src/converse-controlbox.js | 2 +- src/converse-core.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/converse-controlbox.js b/src/converse-controlbox.js index 0a6dfe4e8..39a012852 100644 --- a/src/converse-controlbox.js +++ b/src/converse-controlbox.js @@ -102,7 +102,7 @@ getOldestMaximizedChat: function (exclude_ids) { exclude_ids.push('controlbox'); - this._super.getOldestMaximizedChat(exclude_ids); + this._super.getOldestMaximizedChat.apply(this, arguments); }, getChatBoxWidth: function (view) { diff --git a/src/converse-core.js b/src/converse-core.js index dac9392ec..64421ecbb 100755 --- a/src/converse-core.js +++ b/src/converse-core.js @@ -3098,7 +3098,7 @@ if (typeof value === "function") { var wrapped_function = _.partial( converse.wrappedOverride.bind(converse), - key, value, converse[key].bind(converse), true + key, value, converse[key].bind(converse), true ); converse[key] = wrapped_function; } else { @@ -3122,7 +3122,7 @@ // original method. var wrapped_function = _.partial( converse.wrappedOverride, - key, value, obj.prototype[key], false + key, value, obj.prototype[key], false ); obj.prototype[key] = wrapped_function; } else {