-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
[FIX] Cannot edit or delete custom sounds #8889
[FIX] Cannot edit or delete custom sounds #8889
Conversation
@@ -90,15 +90,15 @@ Template.soundInfo.onCreated(function() { | |||
|
|||
this.autorun(() => { | |||
const data = Template.currentData(); | |||
if (data.clear != null) { | |||
if (data != null && data.clear != null) { |
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 think you can change that to if (data && data.clear !== null)
:)
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.
Sure, thank you for your comment.
this.clear = data.clear; | ||
} | ||
}); | ||
|
||
this.autorun(() => { | ||
const data = Template.currentData(); | ||
const sound = this.sound.get(); | ||
if (sound.name != null) { | ||
if (sound != null && sound.name != null) { |
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.
Same here
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.
OK.
By the way, i just let it the same with the emojiInfo.js
in the beginning
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.
Update if statement
@@ -90,15 +90,15 @@ Template.soundInfo.onCreated(function() { | |||
|
|||
this.autorun(() => { | |||
const data = Template.currentData(); | |||
if (data.clear != null) { | |||
if (data != null && data.clear != null) { |
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.
Sure, thank you for your comment.
this.clear = data.clear; | ||
} | ||
}); | ||
|
||
this.autorun(() => { | ||
const data = Template.currentData(); | ||
const sound = this.sound.get(); | ||
if (sound.name != null) { | ||
if (sound != null && sound.name != null) { |
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.
OK.
By the way, i just let it the same with the emojiInfo.js
in the beginning
@karlprieb do you mind reviewing again? |
@RocketChat/core
Just a minor bug when i would like to upload custom sound and find no way to delete it.