From: Mike Taylor Date: Thu, 9 Oct 2014 12:39:20 +0000 (+0100) Subject: Fix MKWS-283 ("mkws-complete.js doesn't work (though its components do)") X-Git-Tag: 1.0.0~273 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=bfe758e2ea3b4a6ae4368c5b13903780f670c573;p=mkws-moved-to-github.git Fix MKWS-283 ("mkws-complete.js doesn't work (though its components do)") And it's literally a one-character fix. I added a semi-colon to the end of the mkws.makeWidget = function() { ... } assignment. Before commit f9a645b74a9d07ca99973840ee0ceeb07b3c4a83 there was no need for a semi-colon because the widget constructor was a global function defined using the function makeWidget() { ... } syntax. But now that it's an assignment statement rather than a function definition, the semi-colon is needed to end the statement. When mkws-widget.js was included on its own (as it is with all my testing scripts), that's not a problem. The statement is terminated by the end of the file (and JavaScript, trying to be "helpful", doesn't complain about this, but just accepts it silently). But when something else -- in this case mkws-widget-main.js -- is appended to it, the interpretation changes, and the concatenations gets parsed as heaven-knows-what bizarre construct. Anyway, all is now well: mkws.js, mkws-complete.js and the individual source files all work. I guess all this means we ought to be using some kind of lint-like program on the MKWS source (though IIRC Jason doesn't like JSLint itself). --- diff --git a/src/mkws-widget.js b/src/mkws-widget.js index 5476796..3712764 100644 --- a/src/mkws-widget.js +++ b/src/mkws-widget.js @@ -187,4 +187,4 @@ mkws.makeWidget = function($, team, type, node) { } return that; -} +};