question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

From 3.6.0: "TypeError: Cannot read property 'block' of null"

See original GitHub issue

I’m using it with svelte-apollo but I cannot create now reproduction on codesandbox.

Uncaught (in promise) TypeError: Cannot read property 'block' of null
    at Object.destroy [as d] (PlayersPage.svelte:14)
    at destroy_component (index.mjs:1185)
    at App.svelte:31
    at index.mjs:633
    at run (index.mjs:18)
    at Array.forEach (<anonymous>)
    at run_all (index.mjs:24)
    at check_outros (index.mjs:615)
    at Object.update [as p] (App.svelte:31)
    at update (index.mjs:586)

Maybe something related to Object.destroy from 3.6.0 (https://github.com/sveltejs/svelte/issues/3058)?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
Conduitrycommented, Jul 3, 2019

Reduced repro: A <svelte:component> that displays a component with an {#await} block.

App.svelte

<script>
  let flag = false;
  import Widget from './Widget.svelte';
</script>

<input type='checkbox' bind:checked={flag}>

<svelte:component this={flag && Widget}/>

Widget.svelte

{#await null}{/await}

Toggling the checkbox on and off to display and destroy the child component throws this exception.

2reactions
frederikhorscommented, Jul 3, 2019

@Conduitry, I have a reproduction: https://codesandbox.io/s/vigilant-cache-4rtqy

Open browser console, not the codesandbox’s one.

@radarsh, @PaulMaly can you confirm it is the same problem?

Read more comments on GitHub >

github_iconTop Results From Across the Web

JavaScript TypeError: Cannot read property 'style' of null
It sounds like the <div> Noite does not exist when you're calling this script. Try moving the javascript to the body of your...
Read more >
TypeError: Cannot read property 'getEditedPostAttribute' of null
Hey guys. I run into a problem today that prevents the new widgets page to display. I'm getting two errors in my console:...
Read more >
cannot read properties of null (reading 'trim') - You.com
In the devtools console you will see an error: Cannot read properties of null (reading 'trim') . This is because the clearable button...
Read more >
BB Broken on one page only - Beaver Builder Community Forum
Right before it broke, I inserted an HTML block and placed a javascript ... Uncaught TypeError: Cannot read properties of undefined (reading ...
Read more >
cannot read property 'style' of null”` in your JavaScript code ...
Basically, this error tells you that the element you were trying to select was not found (hence, it cannot find the “style” property...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found