Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/vim-web/core-viewers/shared/selection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ export class Selection<T extends IVimElement>{
add(objects: T[]): void;
add(objectOrObjects: T | T[]): void {
if(!this.enabled) return;
if(!objectOrObjects) return;
const objects = this.toArray(objectOrObjects);
let changed = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export class RenderScene {
private unparent2dObjects (target : THREE.Object3D) {
// A quirk of css2d object is they need to be removed individually.
if (target instanceof THREE.Group) {
for (const child of target.children) {
for (const child of [...target.children]) {
if (child instanceof CSS2DObject) {
target.remove(child)
}
Expand Down