-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Description
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch [email protected] for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/rrweb/lib/rrweb.js b/node_modules/rrweb/lib/rrweb.js
index a6992d6..02610cd 100644
--- a/node_modules/rrweb/lib/rrweb.js
+++ b/node_modules/rrweb/lib/rrweb.js
@@ -2426,8 +2426,16 @@ var MutationBuffer = (function () {
rootShadowHost =
((_e = (_d = rootShadowHost === null || rootShadowHost === void 0 ? void 0 : rootShadowHost.getRootNode) === null || _d === void 0 ? void 0 : _d.call(rootShadowHost)) === null || _e === void 0 ? void 0 : _e.host) ||
null;
- var notInDoc = !_this.doc.contains(n) &&
- (rootShadowHost === null || !_this.doc.contains(rootShadowHost));
+ try {
+ if(!_this.doc || !_this.doc.contains){
+ var notInDoc = true
+ }else {
+ var notInDoc = !_this.doc.contains(n) && (rootShadowHost === null || !_this.doc.contains(rootShadowHost));
+ }
+ } catch (error) {
+ console.log('rrweb',error)
+ var notInDoc = true
+ }
if (!n.parentNode || notInDoc) {
return;
}This issue body was partially generated by patch-package.
Metadata
Metadata
Assignees
Labels
No labels