Skip to content

"Error: view" when preventing node creation #38

@mrdrogdrog

Description

@mrdrogdrog

Describe the bug

I use a pipe to prevent the creation of nodes under certain circumstances by returning undefined like described in the docs. However, if the creation is prevented then the dock plugin throws an Error that just says "view".

Example to reproduce

No response

How to reproduce

  • Setup an editor with the dock plugin
  • add
editor.addPipe((context) => {
    if (context.type === 'nodecreate') {
      return undefined;
    }
    return context;
  });
  • try to add a node

Expected behavior

No error should be thrown and the node should not be added.

Dependencies

├── react-dom@19.0.0
├── react@19.0.0
├── rete-area-plugin@2.1.3
├── rete-connection-plugin@2.0.5
├── rete-dock-plugin@2.0.3
├── rete-react-plugin@3.0.0
├── rete-render-utils@2.0.3
├── rete@2.0.5

Platform

Relevant log output

Uncaught (in promise) Error: view

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreleased

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions