Skip to content
This repository was archived by the owner on Mar 29, 2021. It is now read-only.

fixes #118#312

Merged
w20k merged 10 commits intomasterfrom
idrinth
Apr 11, 2017
Merged

fixes #118#312
w20k merged 10 commits intomasterfrom
idrinth

Conversation

@Idrinth
Copy link
Copy Markdown
Member

@Idrinth Idrinth commented Apr 11, 2017

more control for notifications

more control for notifications
Comment thread src/mods/observer.js Outdated
* @returns {Boolean}
*/
var correctServer = function(href, isWorld) {
return (!href.match ( 'serverid=2' )) === !isWorld;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[jshint]

  • Confusing use of '!'.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Comment thread src/mods/observer.js Outdated
* @param {Boolean} isWorld
* @returns {Boolean}
*/
var correctServer = function(href, isWorld) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you revize this method "correctServer"? :)

Why do you "return !isWorld;" and than do the invert again? Maybe I'm missing something.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is world contains the boolean if it's meant to be the worldserver, so if the link matches the serverid=2 part, the boolean equals the question if it's the correct server.
If the string does not match the serverid, it's not the worldserver, so it needs to be inverted.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But you don't test for the setting value? You don't know if it's true or false?

@Idrinth
Copy link
Copy Markdown
Member Author

Idrinth commented Apr 11, 2017

done with fixing weird stuff now i think, @w20k

@w20k
Copy link
Copy Markdown
Collaborator

w20k commented Apr 11, 2017

@w20k w20k merged commit 2c07b34 into master Apr 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants