LP#1684202 - fix bug the prevented automatic refresh
authorCesar Velez <cesar.velez@equinoxinitiative.org>
Wed, 17 Oct 2018 22:06:01 +0000 (18:06 -0400)
committerChris Sharp <csharp@georgialibraries.org>
Tue, 13 Nov 2018 14:35:55 +0000 (09:35 -0500)
Turns out that Array.includes() does not do implicit type convertions
Typical javascript...

Signed-off by: Cesar Velez <cesar.velez@equinoxinitiative.org>

Signed-off-by: Chris Sharp <csharp@georgialibraries.org>

Open-ILS/web/js/ui/default/staff/cat/catalog/app.js

index a38d647..422ebeb 100644 (file)
@@ -1094,7 +1094,7 @@ function($scope , $routeParams , $location , $window , $q , egCore , egHolds , e
                     if (e.data
                         && e.data.records
                         && e.data.records.length
-                        && e.data.records.includes($scope.record_id)
+                        && e.data.records.includes(Number($scope.record_id))
                     ){ // it's for us, refresh grid!
                         console.log("Got broadcast from channel eg.holdings.update for records " + e.data.records);
                         $scope.holdings_record_id_changed($scope.record_id);