Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: type errors
  • Loading branch information
aptlin committed Dec 14, 2022
commit 523d33f3508f76bb1233f908d8d198565b01c48d
4 changes: 2 additions & 2 deletions packages/rrweb-snapshot/src/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ export function parse(css: string, options: ParserOptions = {}) {
whitespace();
comments(rules);
while (css.length && css.charAt(0) !== '}' && (node = atrule() || rule())) {
if (node !== false) {
if ((node as unknown) !== false) {
rules.push(node);
comments(rules);
}
Expand Down Expand Up @@ -383,7 +383,7 @@ export function parse(css: string, options: ParserOptions = {}) {
function comments(rules: Rule[] = []) {
let c: Comment | void;
while ((c = comment())) {
if (c !== false) {
if ((c as unknown) !== false) {
rules.push(c);
}
c = comment();
Expand Down
4 changes: 2 additions & 2 deletions packages/rrweb-snapshot/src/snapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1333,14 +1333,14 @@ function snapshot(
}
: maskAllInputs;
const slimDOMOptions: SlimDOMOptions =
slimDOM === true || slimDOM === 'all'
slimDOM === true || (slimDOM as unknown) === 'all'
? // if true: set of sensible options that should not throw away any information
{
script: true,
comment: true,
headFavicon: true,
headWhitespace: true,
headMetaDescKeywords: slimDOM === 'all', // destructive
headMetaDescKeywords: (slimDOM as unknown) === 'all', // destructive
headMetaSocial: true,
headMetaRobots: true,
headMetaHttpEquiv: true,
Expand Down