Skip to content

Uncaught TypeError: can't access property "classList" of undefined app.js:107:5 #3

@Fishbite

Description

@Fishbite

Hey Ania,

This is the error running your unadulterated code with the exception that I corrected the link to the css file in the html file.

Uncaught TypeError: can't access property "classList", squares[currentLaserIndex] is undefined
moveLaser https://fishbite.github.io/space-invaders/app.js:107
setInterval handlershoot https://fishbite.github.io/space-invaders/app.js:130
EventListener.handleEvent
https://fishbite.github.io/space-invaders/app.js:134
app.js:107:5

It occurs when the laser shot exits the top of the screen and I'm not sure how to fix it!!! Any ideas?

Thanks for the video tutorial BTW. It's much appreciated by many folks out there especially myself :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions