danilosetra/react-responsive-spritesheet

Error when unmounting before loading is done

Closed this issue ยท 3 comments

If you unmount the Spritesheet before the loading is done, an error is thrown.

selection_188

You probably have to check whether the component is still mounted if the onload callback.

EDIT: this line is probably returning null since it has already been unmounted.

@Robinfr checkout this new version ๐Ÿ‘ Also fix #19 . Thanks!

Will check it out, thanks!

Works great! ๐Ÿ˜„