-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add ships and ship building #62
Conversation
✅ Deploy Preview for tangerine-frangipane-73560e ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
|
||
export const buildShip = (system:System) => { | ||
console.log('help') | ||
setTimeout(function(){system.hangar.push(ship1); console.log(system.hangar)}, ship1.buildTime*1000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Shirley, I'm not seeing the ship added to the system's array when I click this button. It's throwing this error generate-sector.ts:32 Uncaught TypeError: Cannot add property 0, object is not extensible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P.S the UI will update if there's something in the hangar. Or at least it SHOULD, we haven't tested that yet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look into Object.freeze and checking to find out when the array/object in question is frozen or not. It might have something to do with set time out having some sort of side effect on the object frozen status.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DylanBozarth @Sjazfrey Do we know if this is ready to merge?
#44