Bug 32030: 30063 follow-up
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 4 May 2022 14:22:03 +0000 (16:22 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 8 Nov 2022 12:43:45 +0000 (09:43 -0300)
In case one option is "0"

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/prog/js/datatables.js

index d6c17c1..9c5386a 100644 (file)
@@ -866,7 +866,7 @@ jQuery.fn.dataTable.ext.errMode = function(settings, note, message) {
                         // FIXME eval here is bad and dangerous, how do we workaround that?
                         $(eval(filter_type)).each(function(){
                             let o = $('<option value="%s">%s</option>'.format(this._id, this._str));
-                            if ( existing_search == this._id ) {
+                            if ( existing_search === this._id ) {
                                 o.prop("selected", "selected");
                             }
                             o.appendTo(select);