diff --git a/js/src/util.js b/js/src/util.js
index 4dde77048f1ac5eb683152da0e73b2811720c6f9..6e32e955d04a06a63d6cfa9493fa467ff3773c14 100644
--- a/js/src/util.js
+++ b/js/src/util.js
@@ -20,7 +20,7 @@ const Util = (($) => {
 
   // Shoutout AngusCroll (https://goo.gl/pxwQGp)
   function toType(obj) {
-    return {}.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase()
+    return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase()
   }
 
   function getSpecialTransitionEndEvent() {