Skip to content

Commit 2f782a4

Browse files
authored
Update jquery.addtabs.js
1 parent 1f2126a commit 2f782a4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

jquery.addtabs.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ $.fn.addtabs = function (options) {
2929
//浏览器前进后退事件
3030
$(window).on("popstate", function (e) {
3131
var state = e.originalEvent.state;
32-
$("a[addtabs=" + state.id + "]", options.monitor).data("pushstate", true).trigger("click");
32+
if (state) {
33+
$("a[addtabs=" + state.id + "]", options.monitor).data("pushstate", true).trigger("click");
34+
}
3335
});
3436
}
3537
$(options.monitor).on('click', '[addtabs]', function (e) {

0 commit comments

Comments
 (0)