Ver Fonte

Fix undefined hash

Denis K há 8 anos atrás
pai
commit
4bc094c2bc
1 ficheiros alterados com 4 adições e 0 exclusões
  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) {