File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ onPage('Decks', function deckStorage() {
6969 const key = getKey ( id ) ;
7070 const deck = JSON . parse ( localStorage . getItem ( key ) ) ;
7171 if ( ! deck ) return ;
72- if ( ! Object . prototype . hasOwnProperty . call ( deck , 'cards' ) ) {
72+ if ( ! Object . hasOwn ( deck , 'cards' ) ) {
7373 localStorage . setItem ( key , JSON . stringify ( {
7474 cards : deck ,
7575 artifacts : [ ] ,
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import changePage from '../vanilla/pageSelect.js';
77
88function set ( type , value , replace = true ) {
99 if ( history . state &&
10- Object . prototype . hasOwnProperty . call ( history . state , type ) &&
10+ Object . hasOwn ( history . state , type ) &&
1111 history . state [ type ] === value ) return ;
1212 const func = replace && ! userLast ( ) ? history . replaceState : history . pushState ;
1313 const o = { } ;
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ export function global(...key) {
44 const {
55 throws = true ,
66 } = typeof key [ key . length - 1 ] === 'object' ? key . pop ( ) : { } ;
7- const found = key . find ( ( e ) => Object . prototype . hasOwnProperty . call ( window , e ) ) ;
7+ const found = key . find ( ( e ) => Object . hasOwn ( window , e ) ) ;
88 if ( found === undefined ) {
99 const msg = `[${ key . join ( ',' ) } ] does not exist` ;
1010 if ( throws ) throw new Error ( msg ) ;
@@ -16,7 +16,7 @@ export function global(...key) {
1616export function globalSet ( key , value , {
1717 throws = true ,
1818} = { } ) {
19- if ( ! Object . prototype . hasOwnProperty . call ( window , key ) ) {
19+ if ( ! Object . hasOwn ( window , key ) ) {
2020 const msg = `[${ key } ] does not exist` ;
2121 if ( throws ) throw new Error ( msg ) ;
2222 return debug ( msg ) ;
You can’t perform that action at this time.
0 commit comments