dv.list returns a Promise and errors in log
See original GitHub issueWhat happened?
Having this:
`$=dv.list([1,2,3])`
outputs <Promise>
and the log shows
Uncaught (in promise) TypeError: Cannot read properties of null (reading 'addChild')
at DataviewApi.list (plugin:dataview:20220:19)
at DataviewInlineApi.list (plugin:dataview:19638:25)
at eval (eval at <anonymous> (plugin:dataview:1:1), <anonymous>:1:38)
at DataviewInlineApi.eval (plugin:dataview:20560:44)
at evalInContext (plugin:dataview:20561:35)
at enter (plugin:dataview:20555:42)
at e.iterate (app.js:1:293053)
at ei.iterate (app.js:1:1541428)
at inlineRender (plugin:dataview:20491:43)
at view.ViewPlugin.fromClass.decorations.update (plugin:dataview:20603:42)
DQL
No response
JS
$=dv.list([1,2,3])
Dataview Version
0.5.46
Obsidian Version
0.15.9
OS
Windows
Issue Analytics
- State:
- Created a year ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Error handling with promises - The Modern JavaScript Tutorial
Promise chains are great at error handling. When a promise rejects, the control jumps to the closest rejection handler.
Read more >Handling errors in Promise.all - Stack Overflow
This utility function returns an object with results and errors . The idea is that all Promises you pass to executeAllPromises will be...
Read more >Promise Error Handling - JavaScript Tutorial
In this tutorial, you will learn about promise error handling that shows you how to handle error in promises.
Read more >Fetch returns promise. However, no error will be thrown if the ...
The first promise is a fetch request for a list of Github repositories. querySelector It returns a promise that resolves with a String....
Read more >Promise.all() - JavaScript - MDN Web Docs
This returned promise fulfills when all of the input's promises fulfill (including when an empty iterable is passed), with an array of the ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Live preview doesn’t handle
dv.list
and other Dataview directives inside inline fields currently; you should use a full codeblock instead:As a picture showing the different outcome