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

Error: calcTextDimensions() requires browser APIs #65

Open
Codehagen opened this issue Jun 11, 2024 · 0 comments
Open

Error: calcTextDimensions() requires browser APIs #65

Codehagen opened this issue Jun 11, 2024 · 0 comments

Comments

@Codehagen
Copy link
Owner

          ![Screenshot 2024-06-11@2x](https://github.com/Codehagen/Dingify/assets/24507211/004f7f11-6ac0-4e2b-8c92-eba24a50d250)

Got a error when i do the following:

  1. Go into users tab.
  2. Press Ctrl + R / Cmd + R
  3. Get this error
    Screenshot 2024-06-11@2x

This is the error in console- We can look at this later and maybe make a new issue for it. Going to merge the PR now.

  ../src/utils/calendar.ts (195:11) @ calcTextDimensions
  Error: calcTextDimensions() requires browser APIs
    at Array.reduce (<anonymous>)
digest: "3723231744"
  193 | function calcTextDimensions(text: string, fontSize: number) {
  194 |   if (typeof document === 'undefined' || typeof window === 'undefined') {
> 195 |     throw new Error('calcTextDimensions() requires browser APIs');
      |           ^
  196 |   }
  197 |
  198 |   if (fontSize < 1) {

Originally posted by @Codehagen in #64 (comment)

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

No branches or pull requests

1 participant