Skip to content

Conversation

@kellyjosephprice
Copy link
Collaborator

@kellyjosephprice kellyjosephprice commented Sep 11, 2024

PR App Ref RM-10740

🧰 Changes

Fix loading owlmoji's.

The ast appears to be frozen, but I'm not sure where that's happening. The image doesn't strictly need the src on the hProperties since rehype will add it later, so this should be fine still.

🧬 QA & Testing

Not sure how to reproduce this yet.

@kellyjosephprice kellyjosephprice marked this pull request as ready for review September 11, 2024 22:48
Comment on lines +45 to +48
const attributes = toAttributes(
{ ...image.data.hProperties, ...('url' in image && { src: image.url }) },
imageAttrs,
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahhh, interesting 🤔 this is a subtle refactor! So just ask to clarify: because we were actually assigning this src in to the image itself, it broke things…somewhere further along in one of our processors' "thread"? That makes sense with your fix!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is where it's erroring, something higher up in the chain is somehow freezing this prop??!?! What's annoying, is I can't seem to reproduce it local to this repo?

Just figured it out. slate uses immer and the emoji serializer is just copying all the slate node data into the mdast. I'll fix this in the main app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants