@samitouri / QOSami-HFS / commits / 2cfa5ab5

fix: console error on upnp errors #774

Massimo Melina committed Oct 15, 2024 at 18:13 UTC 2cfa5ab5cfb00f593a0181a970dbaf16a5d827ff
2 files changed +3 -3
admin/src/InternetPage.ts
+2 -2
@@ -422,10 +422,10 @@ export default function InternetPage() {
422 if (msg) toast(msg, 'success')
423 setCheckResult(undefined) // things have changed, invalidate check result
424 }
425 - catch(e) {
425 + catch(e: any) {
426 if (errMsg) {
427 const low = external && Math.min(external, data!.internalPort!) < 1024
428 - const msg = errMsg + (low ? ". Some routers refuse to work with ports under 1024." : '')
428 + const msg = errMsg + prefix(': ', e?.message) + (low ? ". Some routers refuse to work with ports under 1024." : '')
429 await alertDialog(msg, 'error')
430 }
431 throw e
package.json
+1 -1
@@ -89,7 +89,7 @@
89 "limiter": "^2.1.0",
90 "lodash": "^4.17.21",
91 "minimist": "^1.2.6",
92 - "nat-upnp-rejetto": "^2.0.2",
92 + "nat-upnp-rejetto": "^2.1.0",
93 "open": "^8.4.0",
94 "qr-creator": "^1.0.0",
95 "picomatch": "^3.0.1",