浏览代码

Fix undefined hash

Denis K 8 年之前
父节点
当前提交
4bc094c2bc
共有 1 个文件被更改,包括 4 次插入0 次删除
  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) {