标签栏:刷新后至少保留当前页,避免空着
This commit is contained in:
parent
a8a0c6d4c9
commit
1c00548396
@ -128,7 +128,9 @@
|
||||
existing.title = pageTitle();
|
||||
existing.url = currentUrl;
|
||||
save(items);
|
||||
} else if (openedFromApp) {
|
||||
} else if (openedFromApp || items.length === 0) {
|
||||
// 从系统内点进来的页面,或者当前会话还没有任何标签(例如刷新后),
|
||||
// 把当前页作为第一个标签,避免标签栏空着。
|
||||
items.push({ path: currentPath, url: currentUrl, title: pageTitle() });
|
||||
items = items.slice(-maxTabs);
|
||||
save(items);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user