Skip to content

Commit

Permalink
update(JS): web/javascript/reference/global_objects/object
Browse files Browse the repository at this point in the history
  • Loading branch information
undead404 authored and AdriandeCita committed Sep 22, 2022
1 parent 10c3ecb commit d5b5c4c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ const current = Object.prototype.valueOf;
// Оскільки властивість "-prop-value" є наскрізною, і не завжди присутня
// в тому самому прототипному ланцюжку, виникає потреба змінити Object.prototype:
Object.prototype.valueOf = function (...args) {
if (Object.hasOwn(this, '-prop-value')) {
return this['-prop-value'];
if (Object.hasOwn(this, "-prop-value")) {
return this["-prop-value"];
} else {
// Це не схоже на наш об'єкт, тому повернімося до усталеної поведінки
// шляхом відтворення діючої поведінки, наскільки це можливо.
Expand Down

0 comments on commit d5b5c4c

Please sign in to comment.