Skip to content

Conversation

@Mrazator
Copy link
Member

@Mrazator Mrazator commented Apr 25, 2024

Use a more stable Reflect API (since 2016 in major browsers) for handling observedAppState, instead of Object.hasOwn (since 2021 in major browsers).

The next step is possibly polyfilling the APIs (such as Reflect) through @vitejs/plugin-legacy and it's specifiers https://www.npmjs.com/package/@vitejs/plugin-legacy#polyfill-specifiers.

Can I use Reflect? https://caniuse.com/mdn-javascript_builtins_reflect

Fixes #7957

@vercel
Copy link

vercel bot commented Apr 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
excalidraw ✅ Ready (Inspect) Visit Preview Apr 25, 2024 0:43am
excalidraw-package-example ✅ Ready (Inspect) Visit Preview Apr 25, 2024 0:43am
excalidraw-package-example-with-nextjs ✅ Ready (Inspect) Visit Preview Apr 25, 2024 0:43am
1 Ignored Deployment
Name Status Preview Updated (UTC)
docs ⬜️ Ignored (Inspect) Apr 25, 2024 0:43am

@Mrazator Mrazator assigned Mrazator and unassigned Mrazator Apr 25, 2024
@Mrazator Mrazator requested a review from dwelle April 25, 2024 12:44
@github-actions
Copy link

Coverage Report

Status Category Percentage Covered / Total
🔴 Lines 65.42% (🎯 70%) 50879 / 77766
🔴 Statements 65.42% (🎯 70%) 50879 / 77766
🔴 Functions 66.55% (🎯 68%) 1558 / 2341
🟢 Branches 80.97% (🎯 70%) 6247 / 7715
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
packages/excalidraw/store.ts 96.87% 96.2% 95.83% 96.87% 228-234, 262-263, 304-305, 332-333
Generated in workflow #2355

@Mrazator Mrazator merged commit 4d83d1c into master Apr 25, 2024
@Mrazator Mrazator deleted the mrazator/use-stable-reflect-instead-of-hasown branch April 25, 2024 13:36
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.

TypeError: Object.hasOwn is not a function

3 participants