mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-22 12:03:25 -04:00
change "hasOwnProperty" to "Object.hasOwn"
This commit is contained in:
parent
df53bf04f5
commit
6f59dabf38
@ -55,7 +55,7 @@ const setSpelling = (spelling: string) => {
|
||||
{{ display }}
|
||||
</button>
|
||||
</div>
|
||||
<div v-if="relatedLocalesLookup.hasOwnProperty(config.locale)" class="btn-group m-2">
|
||||
<div v-if="Object.hasOwn(relatedLocalesLookup, config.locale)" class="btn-group m-2">
|
||||
<a
|
||||
v-for="(display, code) in relatedLocalesLookup[config.locale]"
|
||||
:href="$locales[code].url"
|
||||
|
@ -73,7 +73,7 @@ export const hbsLatinToCyrillic = (str: string): string => {
|
||||
if (i + 1 < str.length) {
|
||||
// check for digraphs
|
||||
const digraph = str.substring(i, i + 2);
|
||||
if (HBS_LATIN_TO_CYRILLIC.hasOwnProperty(digraph)) {
|
||||
if (Object.hasOwn(HBS_LATIN_TO_CYRILLIC, digraph)) {
|
||||
result += HBS_LATIN_TO_CYRILLIC[digraph];
|
||||
i += 2;
|
||||
continue;
|
||||
@ -81,7 +81,7 @@ export const hbsLatinToCyrillic = (str: string): string => {
|
||||
}
|
||||
|
||||
const char = str[i];
|
||||
if (HBS_LATIN_TO_CYRILLIC.hasOwnProperty(char)) {
|
||||
if (Object.hasOwn(HBS_LATIN_TO_CYRILLIC, char)) {
|
||||
result += HBS_LATIN_TO_CYRILLIC[char];
|
||||
} else {
|
||||
result += char;
|
||||
|
Loading…
x
Reference in New Issue
Block a user