Uncaught TypeError when creating a new note
johnataravir opened this issue · 2 comments
I'm using OZ to manage a directory of files with the property date
(formatted YYYY-MM-DD). I set the date format in the plugin, and everything looks good. It populates the calendar correctly. However, I have to press the + button twice to get the Create Note dialog. The first time I press it, I get this error:
Uncaught TypeError: Cannot read properties of null (reading 'getHours')
at createNote (plugin:oz-calendar:30322:43)
at HTMLUnknownElement.callCallback2 (plugin:oz-calendar:6810:22)
at Object.invokeGuardedCallbackDev (plugin:oz-calendar:6835:24)
at invokeGuardedCallback (plugin:oz-calendar:6869:39)
at invokeGuardedCallbackAndCatchFirstError (plugin:oz-calendar:6872:33)
at executeDispatch (plugin:oz-calendar:10152:11)
at processDispatchQueueItemsInOrder (plugin:oz-calendar:10172:15)
at processDispatchQueue (plugin:oz-calendar:10181:13)
at dispatchEventsForPlugins (plugin:oz-calendar:10189:11)
at eval (plugin:oz-calendar:10313:20)
createNote @ plugin:oz-calendar:30322
callCallback2 @ plugin:oz-calendar:6810
invokeGuardedCallbackDev @ plugin:oz-calendar:6835
invokeGuardedCallback @ plugin:oz-calendar:6869
invokeGuardedCallbackAndCatchFirstError @ plugin:oz-calendar:6872
executeDispatch @ plugin:oz-calendar:10152
processDispatchQueueItemsInOrder @ plugin:oz-calendar:10172
processDispatchQueue @ plugin:oz-calendar:10181
dispatchEventsForPlugins @ plugin:oz-calendar:10189
eval @ plugin:oz-calendar:10313
batchedUpdates$1 @ plugin:oz-calendar:22045
batchedUpdates @ plugin:oz-calendar:6715
dispatchEventForPluginEventSystem @ plugin:oz-calendar:10312
dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay @ plugin:oz-calendar:8614
dispatchEvent @ plugin:oz-calendar:8608
dispatchDiscreteEvent @ plugin:oz-calendar:8585
This issue does not happen when using the "create a note for this date" menu option that comes up when right-clicking a date.
I've reproduced this issue on MacOS. I can't look at the developer console on iOS to confirm the error is present, but I also have to push the + button twice on my iPad.
Do you still have the same issue? If so, can you please let me now what kind of steps you take after you launch the plugin or vault to get the error? Thanks
I updated the plugin this morning, and I no longer see the issue! Thanks!