Explorar o código

Fix undefined hash

Denis K %!s(int64=8) %!d(string=hai) anos
pai
achega
4bc094c2bc
Modificáronse 1 ficheiros con 4 adicións e 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) {