[Pcsclite-git-commit] [website] 05/07: Reader selection: support undefined fields

Ludovic Rousseau rousseau at moszumanska.debian.org
Sat Oct 17 17:42:25 UTC 2015


This is an automated email from the git hooks/post-receive script.

rousseau pushed a commit to branch master
in repository website.

commit 5320d26a10283f4b9657788349735fa3a1ed87aa
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date:   Fri Oct 16 22:10:14 2015 +0200

    Reader selection: support undefined fields
    
    If the field is undefined then do not try to convert it to uppercase.
    
    The iInterface field is sometimes undefined. When the ~ operator is
    used we use a special treatment in that case.
---
 select_readers/js/main.js | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/select_readers/js/main.js b/select_readers/js/main.js
index 9d21b3e..8e4eda3 100644
--- a/select_readers/js/main.js
+++ b/select_readers/js/main.js
@@ -126,6 +126,11 @@ function match(filters, reader) {
         relation = filters[f][1];
         value = filters[f][2];
 
+        /* may happen with iInterface field */
+        if (reader[field] === undefined) {
+            return false;
+        }
+
         switch (relation[0]) {
         case "=":
             if ('features' === field) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pcsclite/website.git



More information about the Pcsclite-cvs-commit mailing list