Skip to content

Commit 11265a0

Browse files
committed
[scramjet/core] rewriter: don't wrap super.postMessage
1 parent 4e35e34 commit 11265a0

File tree

1 file changed

+1
-1
lines changed
  • packages/scramjet/packages/core/rewriter/js/src

1 file changed

+1
-1
lines changed

packages/scramjet/packages/core/rewriter/js/src/visitor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ where
478478
// you could break this with ["postMessage"] etc
479479
// however this code only exists because of recaptcha whatever
480480
// and it would slow down js execution a lot
481-
if s.property.name == "postMessage" {
481+
if s.property.name == "postMessage" && !matches!(&s.object, Expression::Super(_)) {
482482
// include the "postMessage" and the dot before it in the inner span
483483
// if `postMessage?.` remove the dot and the question mark
484484
let offset = if s.optional { 2 } else { 1 };

0 commit comments

Comments
 (0)