-
Notifications
You must be signed in to change notification settings - Fork 225
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
bug fixed #53 #54
bug fixed #53 #54
Conversation
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.
Almost there! Just another bug that needs taking care of.
By the way, you don't need to create a new pull request - if you push your changes to the same branch, your changes will be added to the PR automatically 😄
public/script.js
Outdated
} | ||
} | ||
else { | ||
console.error(JSON.parse(xhr.responseText)); |
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.
Another bug :) responseText
here is a normal string - not stringified JSON - so it breaks when you try to parse it.
The reason why we need to parse on line 7 is because in that case we're sending back the JSON of our blogposts. Here though, it's just a regular string!
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.
I recommend you test this out in your own code when making this change, so you can see what I mean. For example, you could change the endpoint to something that doesn't exist, then you can see what happens when there's an error.
Maybe we should close this PR and @minaorangina you could put the same review in #53 so that we have a record of everything in the same place? @Salam-Dalloul as Mina said, you can just push to the same branch, so if you have a look at your other pull request, you can see your new changes are now in there! 😃 |
@minaorangina all fixed ... hopefully nothing is messing |
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.
Looks good to me @Salam-Dalloul, thanks very much! Feel free to merge 🎉
Thanks @minaorangina 😄
and i'm not a collaborator 😸 |
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.
Thanks @Salam-Dalloul!
Relates: #53
@claireinez @minaorangina @msmichellegar for review.
In Referance to : Curriculum planning - SPRING 2018 https://github.com/foundersandcoders/master-reference/issues/781