-
Notifications
You must be signed in to change notification settings - Fork 0
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
refactor(various): various changes #11
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.
Supprimer les log avant de merger
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.
All good, supprimer le console.log
if (this.isCloseable()) { | ||
if (message.length > 105) { | ||
return `${message.slice(0, 105)}...`; | ||
} | ||
|
||
return message; | ||
} else { | ||
if (message.length > 120) { | ||
return `${message.slice(0, 120)}...`; | ||
} | ||
|
||
return message; | ||
} |
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.
On pourrait améliorer la lisbilité en utilisant les "early return" pour éviter les conditions imbriqués
if (this.isCloseable()) { | |
if (message.length > 105) { | |
return `${message.slice(0, 105)}...`; | |
} | |
return message; | |
} else { | |
if (message.length > 120) { | |
return `${message.slice(0, 120)}...`; | |
} | |
return message; | |
} | |
if (this.isCloseable() && message.length > 105) { | |
return `${message.slice(0, 105)}...`; | |
} | |
if (message.length > 120) { | |
return `${message.slice(0, 120)}...`; | |
} | |
return message; |
@@ -49,6 +67,9 @@ export class AlertComponent { | |||
} | |||
|
|||
onClose() { | |||
if (this.isCloseable()) { | |||
console.log('hello'); | |||
} |
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.
Supprimer les console.log
🎉 This PR is included in version 1.0.0-next.17 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Changements dans quelques composants: