How do I get around
TypeError: Cannot read property ... of null\ when I have a function that supplies data to a cell with a specific ID value using \document.getElementById():?
The table will work on play, and my console log is not returning any errors about promises or the like.
Unless I am mistaken, this question hearkens back to @bgchen’s answer to a similar problem, but I still can’t work my way through it. I’ve tried combinations of
.then, but I can’t seem to work out the syntax… none of the spots where I try to close the fetch statement work. I’ve also tried adding in ‘await’ in a few spots, but these doesn’t help.
The examples work fine in HTML, so I’m assuming this has something to do with how Observable determines cell run order?
I’ve read the discussion in the thread Is there a way to know which cell got an error? and looked at @mootari’s Tracking and Displaying Errors’s notebook, but, frankly, a lot of this is over my head. On @bgchen’s prompting, I also read over the Mozilla documentation on fetch and Using Promises.
…I am sure it’s a simple answer
Here’s where I am at:
Thanks in advance for your guidance and insights!