Skip to content

Conversation

k22pr
Copy link

@k22pr k22pr commented Dec 14, 2020

No description provided.

@@ -67,7 +67,7 @@ var self = module.exports = {

// Escaping values:
// http://ircv3.net/specs/core/message-tags-3.2.html#escaping-values
unescapeIRC: msg => !msg || !msg.includes('\\') ?
unescapeIRC: msg => !msg || (msg && !msg.includes('\\')) ?
Copy link
Member

@AlcaDesign AlcaDesign Feb 23, 2021

Choose a reason for hiding this comment

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

The change doesn't do anything that the "!msg" isn't already doing, effectively no change. It should do a type check on msg.

unescapeIRC: msg => !msg || typeof msg !== 'string' || !msg.includes('\\') ?

Check out short circuiting.

Copy link
Author

Choose a reason for hiding this comment

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

Thank you for your review. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants