diff --git a/src/item-index.ts b/src/item-index.ts index f2ef995a..216546a3 100644 --- a/src/item-index.ts +++ b/src/item-index.ts @@ -89,7 +89,7 @@ class ItemIndex extends LitElement { for (const item of this.items) { if ( item.sourceUrl.indexOf(this.query) >= 0 || - item.filename.indexOf(this.query) >= 0 || + (item.filename && item.filename.indexOf(this.query) >= 0) || Boolean(item.loadUrl && item.loadUrl.indexOf(this.query) >= 0) || (item.title && item.title.indexOf(this.query) >= 0) ) { diff --git a/webpack.config.js b/webpack.config.js index 6fbeb1e8..21dcccfa 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -94,7 +94,7 @@ const electronPreloadConfig = (/*env, argv*/) => { return merge(tsConfig, config); }; -const browserConfig = (/*env, argv*/) => { +const browserConfig = (env, argv) => { const isDevServer = process.env.WEBPACK_SERVE; /** @type {import('webpack').Configuration['entry']} */ @@ -125,7 +125,7 @@ const browserConfig = (/*env, argv*/) => { }, entry, optimization, - + devtool: argv.mode === "production" ? undefined : "source-map", output: { path: path.join(__dirname), filename: "[name].js",