Skip to content
This repository has been archived by the owner on May 19, 2023. It is now read-only.

Commit

Permalink
fix: double assertion to ensure boolean value
Browse files Browse the repository at this point in the history
  • Loading branch information
aidenybai committed Apr 15, 2021
1 parent 457d720 commit 13bfe9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/compile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const isListRenderScope = (el: HTMLElement): boolean => {
};

export const isUnderListRenderScope = (el: HTMLElement): boolean => {
return el.parentElement && el.parentElement.hasAttribute(`${DIRECTIVE_PREFIX}for`);
return !!el.parentElement && el.parentElement.hasAttribute(`${DIRECTIVE_PREFIX}for`);
};

export const createASTNode = (el: HTMLElement, state: State): ASTNode | undefined => {
Expand Down

0 comments on commit 13bfe9a

Please sign in to comment.