Prevent 0 flag count from rendering in DOM
Preact exhibits funny behavior for inline conditionals that don’t resolve to an actual boolean value. When the flagCount variable is 0 it renders the conditional statement directly in the dom. Casting to a boolean prevents this.
Showing
Please register or sign in to comment