Comparing version 0.0.95 to 0.0.96
@@ -488,3 +488,3 @@ import STRINGS from "../locales/strings.js"; | ||
const result = STRINGS[get_option("language")]; | ||
return result[id] ?? id; | ||
return result?.[id] ?? id; | ||
} | ||
@@ -495,5 +495,7 @@ export function __(value) { | ||
const result = STRINGS[get_option("language")]; | ||
for (const key in result) { | ||
if (result[key] === value) { | ||
return key; | ||
if (result) { | ||
for (const key in result) { | ||
if (result[key] === value) { | ||
return key; | ||
} | ||
} | ||
@@ -500,0 +502,0 @@ } |
@@ -6,3 +6,3 @@ { | ||
"name": "libmuse", | ||
"version": "0.0.95", | ||
"version": "0.0.96", | ||
"description": "A library to interact with the YouTube Music (InnerTube) api.", | ||
@@ -9,0 +9,0 @@ "tags": [ |
@@ -516,3 +516,3 @@ "use strict"; | ||
const result = strings_js_1.default[(0, setup_js_1.get_option)("language")]; | ||
return result[id] ?? id; | ||
return result?.[id] ?? id; | ||
} | ||
@@ -524,5 +524,7 @@ exports._ = _; | ||
const result = strings_js_1.default[(0, setup_js_1.get_option)("language")]; | ||
for (const key in result) { | ||
if (result[key] === value) { | ||
return key; | ||
if (result) { | ||
for (const key in result) { | ||
if (result[key] === value) { | ||
return key; | ||
} | ||
} | ||
@@ -529,0 +531,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
889065
18300