Skip to content

In conjunction with saving XML in commandStack.changed, this module can lead to an infinite loop #2

@philippfromme

Description

@philippfromme

Describe the Bug

Users might not expect commands to be executed during export and listen to commandStack.changed to call #saveXML which can lead to an unexpected infinite loop.

Example: https://codesandbox.io/s/align-to-origin-bug-hmklo?file=/src/index.js

Steps to Reproduce

  1. Listen to commandStack.changed to call #saveXML
  2. Trigger a command stack change
  3. Infinite loop

Expected Behavior

Either align to origin without the need for a command or somehow make it easier to avoid an unexpected infinite loop (e.g. by defaulting to alignOnSave: false.

Environment

  • Library version: v0.6.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingspring cleaningCould be cleaned up one daywontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions