mark-when / mw

Markwhen CLI
39 stars 2 forks source link

TypeError on calendar view html rendering #2

Open maxwu opened 11 months ago

maxwu commented 11 months ago

Thanks for the cool mw-cli to render HTML in scripting! The issue happens with the calendar view. The rendered HTML shows an empty page in Chrome browser with below error. The MW file can be rendered in calendar view in vs-code plugin. Could I get hints on how to resolve it?

Uncaught TypeError: Cannot read properties of undefined (reading 'appState')
    at h (smoke-calendar.html:121:56698)
    at smoke-calendar.html:121:56865
    at r (smoke-calendar.html:47:57642)
    at Object.markwhenState (smoke-calendar.html:121:56594)
    at UT (smoke-calendar.html:63:2485)
    at smoke-calendar.html:121:55611
    at Lh (smoke-calendar.html:47:57857)
    at pT (smoke-calendar.html:47:57877)
    at zh (smoke-calendar.html:63:1035)
    at zT (smoke-calendar.html:63:1099)

The html file is rendered by 'mw smoke.mw smoke-calendar.html' command and the sample source of smoke.mw is:

#travel: blue
#leave: green

Section: Sample Calendar

2023-11-07/2023-11-08: @John #leave

2023-11-19/2023-11-20: @Alice #travel
kochrt commented 11 months ago

I just bumped some outdated deps, can you update the CLI to 1.2.4 and try again?

maxwu commented 11 months ago

Hey Rob, thanks for the reply. It still happens with mw@v1.2.4.

❯ mw --version
1.2.4
❯ mw smoke.mw smoke-calendar.html
❯ open smoke-calendar.html &

Then I saw the same error log in Chrome DevTools console:

image
cba85 commented 5 months ago

I have the same problem using mw 1.2.4 😞

Screenshot 2024-04-29 at 11 09 27

Edit: Timeline view works perfectly. It's just the calendar view that doesn't work.