Skip to content

Commit 0f20041

Browse files
perf(ContextService): avoid unnecessary allocation
1 parent 3560a97 commit 0f20041

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/context.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -692,8 +692,7 @@ export class ContextService {
692692
let entityPosition = entity.position;
693693
let entityOrientation = entity.orientation;
694694

695-
if (entityPosition instanceof ConstantPositionProperty &&
696-
entityPosition.referenceFrame === referenceFrame) {
695+
if (entityPosition instanceof ConstantPositionProperty) {
697696
entityPosition.setValue(positionValue, referenceFrame);
698697
} else {
699698
entity.position = new ConstantPositionProperty(positionValue, referenceFrame);

0 commit comments

Comments
 (0)