Skip to content

Commit e3f1d2a

Browse files
committed
🛠️ Fix #356
1 parent f6c0713 commit e3f1d2a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/outliner/util.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,18 @@ import { VanillaItemDisplay } from './vanillaItemDisplay'
55

66
export function sanitizeOutlinerElementName(name: string, elementUUID: string): string {
77
name = toSafeFuntionName(name)
8-
const otherNodes: OutlinerElement[] = [
9-
...VanillaBlockDisplay.all.filter(v => v.uuid !== elementUUID),
8+
let otherNodes: OutlinerElement[] = [
9+
...VanillaBlockDisplay.all,
1010
...Group.all,
1111
...TextDisplay.all,
1212
...VanillaItemDisplay.all,
13+
...Locator.all,
1314
]
1415
if (OutlinerElement.types.camera) {
1516
otherNodes.push(...OutlinerElement.types.camera.all)
1617
}
18+
otherNodes = otherNodes.filter(v => v.uuid !== elementUUID)
19+
1720
const otherNames = new Set(otherNodes.map(v => v.name))
1821

1922
if (!otherNames.has(name)) {

0 commit comments

Comments
 (0)