Skip to content

Commit e444737

Browse files
committed
fix: solve small highlight guard logic flaw
1 parent 624b515 commit e444737

File tree

1 file changed

+4
-2
lines changed
  • packages/front/src/fragments/Highlighter

1 file changed

+4
-2
lines changed

packages/front/src/fragments/Highlighter/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,10 @@ export class Highlighter
267267
const caster = casters.get(world);
268268
const result = caster.castRay(allMeshes);
269269

270-
if ((!result || !result.face) && removePrevious) {
271-
this.clear(name);
270+
if (!result || !result.face) {
271+
if (removePrevious) {
272+
this.clear(name);
273+
}
272274
return null;
273275
}
274276

0 commit comments

Comments
 (0)