Skip to content

Hit error when removing "line__xxx" component #5080

@diarmidmackenzie

Description

@diarmidmackenzie

Description:

  • A-Frame Version: 1.3.0
  • Platform / Device: All
  • Reproducible Code Snippet or URL: None provided.

Create a line components on an entity with a name like line__2, as per this example.
https://aframe.io/docs/1.3.0/components/line.html

Remove the line component.

You get this console error.
core:a-entity:warn Tried to remove Object3D of type: line which was not defined.

Very simple bug.

This line assumes the Object3D name used for the mesh is "line". In fact it will be "line__2"

    this.el.removeObject3D('line', this.line);

Correct code should be:

    this.el.removeObject3D(this.attrName, this.line);

(matching the earlier call to setObject3D)

I will submit a PR for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions