Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object.hasOwn is not a function in mermaid diagrams in notion-repackaged #114

Open
dolfandringa opened this issue Sep 21, 2023 · 4 comments
Labels
bug Something isn't working right

Comments

@dolfandringa
Copy link

What is happening?
When looking at a mermaid diagram (rendered through a code snippet of language mermaid) I see the mermaid code, but when its rendering the image, it give a javascript error Unknown Error: TypeError: Object.hasOwn is not a function.

Checking the error, it looks like Object.hasOwn is only supported since nodejs 16.9, but looking in this repo, notion-repackaged seems to use nodejs 14.17.1. This would explain the issue.

If upgrading nodejs isn't an option, there also seems to be a polyfill for it that could maybe solve it? https://github.com/es-shims/Object.hasOwn

What should be happening?
The mermaid diagram should be rendered.

Screenshots (if applicable):
Issue in notion-repackaged:
image

Its fine in the browser:
image

Operating system/browser name & version:
Fedora Linux 38

notion-enhancer and/or notion-repackaged version:
notion-app-2.0.18-1.x86_64

notion-enhancer configuration (enabled/disabled mods and their settings):

@dolfandringa dolfandringa added the bug Something isn't working right label Sep 21, 2023
@reopencil
Copy link

me too

@sheiun-xu
Copy link

Same on Ubuntu 22.04, notion-app

@Yu-Xiao-Sheng
Copy link

我也是,在Ubuntu22.04上,notion-app-enhanced

@iliabaranov
Copy link

same :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working right
Projects
None yet
Development

No branches or pull requests

5 participants