From fb2e5e27c7c27e9c9ba68c6533e433e4d8248abb Mon Sep 17 00:00:00 2001 From: JC Brand Date: Sun, 28 Feb 2016 00:37:38 +0000 Subject: [PATCH] Let the utils work without Jed available. --- src/utils.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utils.js b/src/utils.js index 053aa8ee0..40f64b3b3 100755 --- a/src/utils.js +++ b/src/utils.js @@ -4,10 +4,9 @@ "jquery", "jquery.browser", "underscore", - "jed", "converse-templates" ], factory); -}(this, function ($, dummy, _, Jed, templates) { +}(this, function ($, dummy, _, templates) { "use strict"; var XFORM_TYPE_MAP = { @@ -92,6 +91,9 @@ // Translation machinery // --------------------- __: function (str) { + if (typeof Jed === "undefined") { + return str; + } // FIXME: this can be refactored to take the i18n obj as a // parameter. // Translation factory