mirror of
https://github.com/Kornstalx/5etools-mirror-2.github.io.git
synced 2025-10-28 20:45:35 -05:00
v1.207.1
This commit is contained in:
11
js/search.js
11
js/search.js
@@ -182,9 +182,14 @@ class SearchPage {
|
||||
}
|
||||
|
||||
if (this._PARAM_LUCKY in params) {
|
||||
const [result] = results;
|
||||
window.location = `${Renderer.get().baseUrl}${Omnisearch.getResultHref(result.doc)}`;
|
||||
return;
|
||||
const [href] = results
|
||||
.map(res => Omnisearch.getResultHref(res.doc))
|
||||
.filter(Boolean);
|
||||
|
||||
if (href) {
|
||||
window.location = `${Renderer.get().baseUrl}${href}`;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
SearchPage._rowMetas = results.map(result => {
|
||||
|
||||
Reference in New Issue
Block a user