Skip to content

Commit 9e4805d

Browse files
调整hash识别的bug
1 parent e4f790c commit 9e4805d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: router.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,9 @@
184184
},
185185

186186
listen: function() {
187-
let url = location.hash.split('#')[1];
187+
let url = `${this.base}${location.hash.split('#')[1]}`;
188188

189-
if (_router.hasOwnProperty(`${this.base}${url}`)) {
189+
if (_router.hasOwnProperty(url)) {
190190
let item = _router[url];
191191
item.before();
192192
util.render(item.id, item.template, item.after)

0 commit comments

Comments
 (0)