marktext / muya

📄 Future markdown editor for web browser applications development
MIT License
639 stars 56 forks source link

Replace image and cause error #118

Closed Jocs closed 1 year ago

Jocs commented 1 year ago

Describe the bug

Cannot read properties of undefined (reading 'replaceImage')
TypeError: Cannot read properties of undefined (reading 'replaceImage')
    at ImageSelector.replaceImageAsync (http://localhost:3000/main.bundle.js:64844:32)
    at ImageSelector.handleLinkButtonClick (http://localhost:3000/main.bundle.js:65207:21)
    at Object.click (http://localhost:3000/main.bundle.js:64954:34)
    at invokeHandler (http://localhost:3000/main.bundle.js:46473:17)
    at handleEvent (http://localhost:3000/main.bundle.js:46487:9)
    at HTMLButtonElement.handler (http://localhost:3000/main.bundle.js:46492:9)

To Reproduce Steps to reproduce the behavior:

  1. Insert an image
  2. Click the image edit button
  3. Input a new image url, and click the confirm button
  4. See error

Expected behavior New image to replace the old image and show in the editor

Actual behavior Error happened.

Operation System and Browser version (please complete the following information):

Muya Version e.g: 0.10.11

Additional context((Optional)) Add any other context about the problem here.