diff options
| author | Henry Jameson <me@hjkos.com> | 2022-07-31 12:36:02 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2022-07-31 12:36:02 +0300 |
| commit | fc18673030513fa663289d051bb0733a97b8e053 (patch) | |
| tree | 97114e0544414689c08fc04f50bcfbb22689e725 /src/services/entity_normalizer/entity_normalizer.service.js | |
| parent | fddb531ed20b31c44e6911418e7bbb884836c40a (diff) | |
deal with no-prototype-builtins
Diffstat (limited to 'src/services/entity_normalizer/entity_normalizer.service.js')
| -rw-r--r-- | src/services/entity_normalizer/entity_normalizer.service.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js index 86472b42..7f831ed9 100644 --- a/src/services/entity_normalizer/entity_normalizer.service.js +++ b/src/services/entity_normalizer/entity_normalizer.service.js @@ -39,9 +39,9 @@ const qvitterStatusType = (status) => { export const parseUser = (data) => { const output = {} - const masto = data.hasOwnProperty('acct') + const masto = Object.prototype.hasOwnProperty.call(data, 'acct') // case for users in "mentions" property for statuses in MastoAPI - const mastoShort = masto && !data.hasOwnProperty('avatar') + const mastoShort = masto && !Object.prototype.hasOwnProperty.call(data, 'avatar') output.id = String(data.id) output._original = data // used for server-side settings @@ -225,7 +225,7 @@ export const parseUser = (data) => { export const parseAttachment = (data) => { const output = {} - const masto = !data.hasOwnProperty('oembed') + const masto = !Object.prototype.hasOwnProperty.call(data, 'oembed') if (masto) { // Not exactly same... @@ -246,7 +246,7 @@ export const parseAttachment = (data) => { export const parseStatus = (data) => { const output = {} - const masto = data.hasOwnProperty('account') + const masto = Object.prototype.hasOwnProperty.call(data, 'account') if (masto) { output.favorited = data.favourited @@ -374,7 +374,7 @@ export const parseNotification = (data) => { favourite: 'like', reblog: 'repeat' } - const masto = !data.hasOwnProperty('ntype') + const masto = !Object.prototype.hasOwnProperty.call(data, 'ntype') const output = {} if (masto) { |
