Skip to content

Commit

Permalink
Add logMessage
Browse files Browse the repository at this point in the history
Log message if functionName is not a function
  • Loading branch information
AdamWr committed Nov 13, 2023
1 parent a826233 commit 3d348db
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/scriptlets/trusted-prune-inbound-object.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ export function trustedPruneInboundObject(source, functionName, propsToRemove, r

const { base, prop } = getPropertyInChain(window, functionName);
if (!base || !prop || typeof base[prop] !== 'function') {
const message = `${functionName} is not a function`;
logMessage(source, message);
return;
}

Expand Down

0 comments on commit 3d348db

Please sign in to comment.