fix: fixed bug where search path was null

This commit is contained in:
XPoet 2020-11-19 17:08:27 +08:00
parent 51ccaa3dda
commit 324e609079
1 changed files with 280 additions and 279 deletions

View File

@ -6,6 +6,7 @@ window.addEventListener('DOMContentLoaded', () => {
let isXml = true; let isXml = true;
// Search DB path // Search DB path
let searchPath = CONFIG.path; let searchPath = CONFIG.path;
if (!searchPath) return false;
if (searchPath.length === 0) { if (searchPath.length === 0) {
searchPath = 'search.xml'; searchPath = 'search.xml';
} else if (searchPath.endsWith('json')) { } else if (searchPath.endsWith('json')) {