From 90e245f3c54c9eeaa355c71844f5da0baf8ccac0 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Mon, 6 Jan 2014 21:02:27 -0600 Subject: [PATCH] Fix "null" device model for Firefox OS Tablet UA --- src/detectizr.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/detectizr.js b/src/detectizr.js index ca04eab..e081ba7 100644 --- a/src/detectizr.js +++ b/src/detectizr.js @@ -204,7 +204,7 @@ } else if ((that.test(/tablet/i) && !that.test(/RX-34/i)) || that.test(/FOLIO/i)) { // Check if user agent is a Tablet device.type = deviceTypes[1]; - device.model = String(that.exec(/playbook/)); + device.model = String(that.exec(/playbook/) || ""); } else if (that.test(/Linux/i) && that.test(/Android/i) && !that.test(/Fennec|mobi|HTC.Magic|HTCX06HT|Nexus.One|SC-02B|fone.945/i)) { // Check if user agent is an Android Tablet device.type = deviceTypes[1];