Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra committed Nov 19, 2024
1 parent e8d12dd commit 113a71e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 22 deletions.
39 changes: 20 additions & 19 deletions patches/@[email protected]
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
diff --git a/dist/record.js b/dist/record.js
index 46ec389fefb698243008b39db65470dbdf0a3857..990c16270b0def8c49134f4d2f9ce0bc3befe706 100644
index 46ec389fefb698243008b39db65470dbdf0a3857..e3e91248c890da930bd71af9883b94d4f09c1bdc 100644
--- a/dist/record.js
+++ b/dist/record.js
@@ -20,6 +20,15 @@ const testableAccessors$1 = {
@@ -20,6 +20,14 @@ const testableAccessors$1 = {
Element: ["shadowRoot", "querySelector", "querySelectorAll"],
MutationObserver: []
};
+const isFunction = (x) => typeof x === 'function';
+const isNativeFunction = (x) => isFunction(x) && x.toString().includes("[native code]");
+const isAngularZonePatchedFunction = (x) => {
+ if (!isFunction(x)) {
+ return false;
Expand All @@ -18,28 +17,30 @@ index 46ec389fefb698243008b39db65470dbdf0a3857..990c16270b0def8c49134f4d2f9ce0bc
const testableMethods$1 = {
Node: ["contains", "getRootNode"],
ShadowRoot: ["getSelection"],
@@ -36,13 +45,13 @@ function getUntaintedPrototype$1(key) {
@@ -35,14 +43,14 @@ function getUntaintedPrototype$1(key) {
const accessorNames = key in testableAccessors$1 ? testableAccessors$1[key] : void 0;
const isUntaintedAccessors = Boolean(
accessorNames && // @ts-expect-error 2345
accessorNames.every(
- accessorNames.every(
- (accessor) => {
- var _a2, _b;
- return Boolean(
- (_b = (_a2 = Object.getOwnPropertyDescriptor(defaultPrototype, accessor)) == null ? void 0 : _a2.get) == null ? void 0 : _b.toString().includes("[native code]")
- );
- }
- )
+ (accessor) => {
+ var _a2, _b;
+ return Boolean(
+ (_b = (_a2 = Object.getOwnPropertyDescriptor(defaultPrototype, accessor)) == null ? void 0 : _a2.get) == null ? void 0 : _b.toString().includes("[native code]")
+ );
+ }
+ ),
+ accessorNames.every(
+ (accessor) => {
+ var _a2, _b;
+ return Boolean(
+ (_b = (_a2 = Object.getOwnPropertyDescriptor(defaultPrototype, accessor)) == null ? void 0 : _a2.get) == null ? void 0 : _b.toString().includes("[native code]")
+ );
+ }
+ ),
);
const methodNames = key in testableMethods$1 ? testableMethods$1[key] : void 0;
const isUntaintedMethods = Boolean(
@@ -54,7 +63,7 @@ function getUntaintedPrototype$1(key) {
@@ -54,7 +62,7 @@ function getUntaintedPrototype$1(key) {
}
)
);
Expand All @@ -48,7 +49,7 @@ index 46ec389fefb698243008b39db65470dbdf0a3857..990c16270b0def8c49134f4d2f9ce0bc
untaintedBasePrototype$1[key] = defaultObj.prototype;
return defaultObj.prototype;
}
@@ -246,6 +255,9 @@ function isCSSImportRule(rule2) {
@@ -246,6 +254,9 @@ function isCSSImportRule(rule2) {
function isCSSStyleRule(rule2) {
return "selectorText" in rule2;
}
Expand All @@ -58,7 +59,7 @@ index 46ec389fefb698243008b39db65470dbdf0a3857..990c16270b0def8c49134f4d2f9ce0bc
class Mirror {
constructor() {
__publicField$1(this, "idNodeMap", /* @__PURE__ */ new Map());
@@ -809,9 +821,14 @@ function serializeElementNode(n2, options) {
@@ -809,9 +820,14 @@ function serializeElementNode(n2, options) {
}
}
if (tagName === "link" && inlineStylesheet) {
Expand All @@ -76,7 +77,7 @@ index 46ec389fefb698243008b39db65470dbdf0a3857..990c16270b0def8c49134f4d2f9ce0bc
let cssText = null;
if (stylesheet) {
cssText = stringifyStylesheet(stylesheet);
@@ -1116,7300 +1133,227 @@ function serializeNodeWithId(n2, options) {
@@ -1116,7300 +1132,227 @@ function serializeNodeWithId(n2, options) {
keepIframeSrcFn
};
if (serializedNode.type === NodeType$2.Element && serializedNode.tagName === "textarea" && serializedNode.attributes.value !== void 0) ;
Expand Down Expand Up @@ -7586,7 +7587,7 @@ index 46ec389fefb698243008b39db65470dbdf0a3857..990c16270b0def8c49134f4d2f9ce0bc
class BaseRRNode {
// eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any
constructor(..._args) {
@@ -8507,7 +1451,7 @@ function getUntaintedPrototype(key) {
@@ -8507,7 +1450,7 @@ function getUntaintedPrototype(key) {
}
)
);
Expand All @@ -7595,7 +7596,7 @@ index 46ec389fefb698243008b39db65470dbdf0a3857..990c16270b0def8c49134f4d2f9ce0bc
untaintedBasePrototype[key] = defaultObj.prototype;
return defaultObj.prototype;
}
@@ -11382,11 +4326,19 @@ class CanvasManager {
@@ -11382,11 +4325,19 @@ class CanvasManager {
let rafId;
const getCanvas = () => {
const matchedCanvas = [];
Expand All @@ -7620,7 +7621,7 @@ index 46ec389fefb698243008b39db65470dbdf0a3857..990c16270b0def8c49134f4d2f9ce0bc
return matchedCanvas;
};
const takeCanvasSnapshots = (timestamp) => {
@@ -11407,13 +4359,20 @@ class CanvasManager {
@@ -11407,13 +4358,20 @@ class CanvasManager {
context.clear(context.COLOR_BUFFER_BIT);
}
}
Expand Down
6 changes: 3 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 113a71e

Please sign in to comment.