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.

TypeError: Cannot read property 'destroy' of undefined

See original GitHub issue

Cannot read property ‘destroy’ of undefined value: function destroy() { this.anim.destroy(); }

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:6

github_iconTop GitHub Comments

10reactions
jdmcdcommented, Oct 23, 2018

@luskin I just discovered that import animationData from './animation.json' also works (minus the * as)

5reactions
luskincommented, Oct 12, 2018

as a workaround I discovered you can do the following:

const defaultOptions = {
      loop: true,
      autoplay: true,
      animationData: require('./animation.json'),
      rendererSettings: {
        preserveAspectRatio: 'xMidYMid slice',
      },
    }

...


<Lottie options={defaultOptions} height={240} width={'75%'} />

instead of import * as animationData from './animation.json'

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to deal or remove "Cannot read property 'destroy' of null"
"Cannot read property 'destroy' of null" - This error has occurred because the underlying js implementation gets failed to initialize the global ...
Read more >
TypeError: Cannot read property 'destroy' of undefined #186
I'm using it with typescript and getting following error. TypeError: Cannot read property 'destroy' of undefined at ReactFullpage.destroy. Do ...
Read more >
DataTables "Cannot read property 'destroy' of undefined"
This function works well to initiate my first table but I get "Cannot read property 'destroy' of undefined" on subsequent calls.
Read more >
Cannot read property 'destroy' of undefined - Odoo
Hi friend;. Check your Function Destroy. In fact, it is using a field which is undefined. You can print the field before you...
Read more >
Cannot read property 'destroy' of undefined TypeError
Hello, I have a problem when refresh the page with a table, I have a button, it goes to a component on angular...
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