Skip to content

Commit 5ccab59

Browse files
committed
Addressed comments
1 parent c9d3ae2 commit 5ccab59

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/core/utils/dq-element.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ function getSource(element) {
176176
}
177177
// Remove unwanted attributes
178178
const regex = /\s*data-percy-[^=]+="[^"]*"/g; // Remove unwanted attributes
179-
source = source.replace(regex, '');
179+
source = (source || '').replace(regex, '');
180180
const htmlString = truncate(source || '');
181181
return htmlString;
182182
}

0 commit comments

Comments
 (0)