Part of ACREP-35.
authorMike Taylor <mike@indexdata.com>
Fri, 22 May 2015 10:53:21 +0000 (11:53 +0100)
committerMike Taylor <mike@indexdata.com>
Fri, 22 May 2015 10:53:21 +0000 (11:53 +0100)
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.

src/mkws-widget-categories.js

index 61abb4e..8b2b00f 100644 (file)
@@ -1,11 +1,6 @@
 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)