From 729010a7313db4fde58c6bb4e299f494c8568444 Mon Sep 17 00:00:00 2001 From: Eugen Neuber <eugen.neuber@tugraz.at> Date: Mon, 18 Jan 2021 15:39:35 +0100 Subject: [PATCH] Change call of `hasOwnProperty()` --- packages/provider/src/provider.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/provider/src/provider.js b/packages/provider/src/provider.js index 1f2f32ff..7cd95fc0 100644 --- a/packages/provider/src/provider.js +++ b/packages/provider/src/provider.js @@ -14,7 +14,7 @@ export class Provider extends HTMLElement { this.addEventListener('subscribe', function (e) { const name = e.detail.name; - if (that.hasOwnProperty(name) || that.root) { + if (Object.hasOwnProperty.call(that, name) || that.root) { console.log('Provider(' + that.id + ') eventListener("subscribe",..) name "' + name + '" found.'); that.callbackStore.push({name: name, callback: e.detail.callback, sender: e.detail.sender}); @@ -26,7 +26,7 @@ export class Provider extends HTMLElement { this.addEventListener('unsubscribe', function (e) { const name = e.detail.name; const sender = e.detail.sender; - if (that.hasOwnProperty(name) || that.root) { + if (Object.hasOwnProperty.call(that, name) || that.root) { console.log('Provider(' + that.id + ') eventListener("unsubscribe",..) name "' + name + '" found.'); that.callbackStore.forEach(item => { if (item.sender === sender && item.name === name) { @@ -45,7 +45,7 @@ export class Provider extends HTMLElement { const name = e.detail.name; const value = e.detail.value; - if (that.hasOwnProperty(name) || that.root) { + if (Object.hasOwnProperty.call(that, name) || that.root) { console.log('Provider(' + that.id + ') eventListener("set-property",..) name "' + name + '" found.'); that[name] = value; -- GitLab