From 00caccd1a3152771eef3a40d9fd08234cf6c105a Mon Sep 17 00:00:00 2001 From: rlanvin Date: Wed, 17 Feb 2016 09:45:53 +0200 Subject: [PATCH] Fix non_amd.html - converse-muc.js was overriding the global "converse" variable with undefind (the factory function didn't return anything) - locales was not defined in utils.js in non AMD (not passed in the factory function) --- non_amd.html | 3 ++- src/converse-muc.js | 2 +- src/utils.js | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) mode change 100644 => 100755 non_amd.html mode change 100644 => 100755 src/converse-muc.js mode change 100644 => 100755 src/utils.js diff --git a/non_amd.html b/non_amd.html old mode 100644 new mode 100755 index 5028034fd..614663538 --- a/non_amd.html +++ b/non_amd.html @@ -47,7 +47,8 @@ - + +
diff --git a/src/converse-muc.js b/src/converse-muc.js old mode 100644 new mode 100755 index 385b4b3df..47e2f1f2b --- a/src/converse-muc.js +++ b/src/converse-muc.js @@ -19,7 +19,7 @@ // In this case, the dependencies need to be available already as // global variables, and should be loaded separately via *script* tags. // See the file **non_amd.html** for an example of this usecase. - root.converse = factory(converse, utils); + factory(converse, utils); } }(this, function (converse_api, utils) { // Strophe methods for building stanzas diff --git a/src/utils.js b/src/utils.js old mode 100644 new mode 100755 index 6e588d051..06883e812 --- a/src/utils.js +++ b/src/utils.js @@ -1,9 +1,9 @@ -/*global jQuery, templates, escape, Jed, _ */ +/*global jQuery, templates, escape, Jed, _, locales */ (function (root, factory) { if (typeof define === 'function' && define.amd) { define(["jquery", "underscore", "converse-templates", "locales"], factory); } else { - root.utils = factory(jQuery, _, templates); + root.utils = factory(jQuery, _, templates, locales); } }(this, function ($, _, templates, locales) { "use strict";