From the "categories" widget, remove the unnecessary and harmful check
that authentication has been completed. Of course it generally has NOT
at the time the widget is created, resulting in an assertion-failure.
But this is unnecessary anyway, because the body of the widget's code
is in any case run as a callback when authentication is complete.
mkws.registerWidgetType('categories', function() {
var that = this;
- if (!mkws.authenticated) {
- alert("can't use categories widget when not authenticated");
- return;
- }
-
this.team.queue("authenticated").subscribe(function(authName, realm) {
var req = new pzHttpRequest(mkws.pazpar2_url() + "?command=categories", function(err) {
alert("HTTP call for categories failed: " + err)