Skip to content

Commit

Permalink
replaced hasOwnProperty with Object.prototype.hasOwnProperty.call()
Browse files Browse the repository at this point in the history
for node 6 compatibility

see hapijs/hapi#3280
  • Loading branch information
klausj authored Oct 16, 2017
1 parent 7128109 commit d596a98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions IPS-EMUprot-nodeWSserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,7 @@ return deferred.promise;
function defaultHandlerGetDoUserManagement(mJSO, wsConnect) {
// IF the user did not send a secretToken, we ask them for
// username/password. Otherwise, we check the secret token.
if (!wsConnect.urlQuery.hasOwnProperty('secretToken')) {
if (!Object.prototype.hasOwnProperty.call(wsConnect.urlQuery, 'secretToken')) {
sendMessage(wsConnect, mJSO.callbackID, true, '', 'YES');
} else {
var secretToken = wsConnect.urlQuery.secretToken;
Expand Down Expand Up @@ -1320,7 +1320,7 @@ function defaultHandlerGetBundle(mJSO, wsConnect) {

// Check whether mJSO.type is valid and call the respective handler
if (
wsConnect.messageHandlers.hasOwnProperty(mJSO.type)
Object.prototype.hasOwnProperty.call(wsConnect.messageHandlers, mJSO.type)
&& typeof wsConnect.messageHandlers[mJSO.type] === 'function'
) {
// Call the event handler but make sure we catch *all* errors
Expand Down

0 comments on commit d596a98

Please sign in to comment.