Explorar el Código

Fix undefined hash

Denis K hace 8 años
padre
commit
4bc094c2bc
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      jet/static/jet/js/src/features/changeform-tabs.js

+ 4 - 0
jet/static/jet/js/src/features/changeform-tabs.js

@@ -13,6 +13,10 @@ ChangeFormTabs.prototype = {
         return $().add($modules).add($inlines);
     },
     getHashSelector: function(hash) {
+        if (hash == undefined) {
+            return null;
+        }
+
         var result = hash.match(/^(#(\/tab\/(.+)\/)?)?$/i);
 
         if (result == null) {