diff --git a/lib/scripts/compatibility.js b/lib/scripts/compatibility.js
index 27347972a7a6524465e2bf1240b616159b0e9dc1..13b088582f300fd1749d88db14a17a74f00a2a17 100644
--- a/lib/scripts/compatibility.js
+++ b/lib/scripts/compatibility.js
@@ -99,6 +99,7 @@ function findPosY(object){
 function getElementsByClass(searchClass,node,tag){
     DEPRECATED('Use jQuery() instead');
     if(node == null) node = document;
+    if(typeof tag === 'undefined') tag = '';
     return jQuery(node).find(tag+'.'+searchClass).toArray();
 }