Skip to content

[FIX] Cannot edit or delete custom sounds#8889

Merged
rodrigok merged 2 commits intoRocketChat:developfrom
ccfang:fix-custom-sound-cannot-edit
Dec 4, 2017
Merged

[FIX] Cannot edit or delete custom sounds#8889
rodrigok merged 2 commits intoRocketChat:developfrom
ccfang:fix-custom-sound-cannot-edit

Conversation

@ccfang
Copy link
Copy Markdown
Contributor

@ccfang ccfang commented Nov 17, 2017

@RocketChat/core

Just a minor bug when i would like to upload custom sound and find no way to delete it.

this.autorun(() => {
const data = Template.currentData();
if (data.clear != null) {
if (data != null && data.clear != null) {
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.

I think you can change that to if (data && data.clear !== null) :)

Copy link
Copy Markdown
Contributor Author

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.

const data = Template.currentData();
const sound = this.sound.get();
if (sound.name != null) {
if (sound != null && sound.name != null) {
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.

Same here

Copy link
Copy Markdown
Contributor Author

@ccfang ccfang Nov 20, 2017

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

Copy link
Copy Markdown
Contributor Author

@ccfang ccfang left a comment

Choose a reason for hiding this comment

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

Update if statement

this.autorun(() => {
const data = Template.currentData();
if (data.clear != null) {
if (data != null && data.clear != null) {
Copy link
Copy Markdown
Contributor Author

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.

const data = Template.currentData();
const sound = this.sound.get();
if (sound.name != null) {
if (sound != null && sound.name != null) {
Copy link
Copy Markdown
Contributor Author

@ccfang ccfang Nov 20, 2017

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

@graywolf336
Copy link
Copy Markdown
Contributor

@karlprieb do you mind reviewing again?

@graywolf336 graywolf336 added this to the 0.60.0 milestone Dec 4, 2017
@rodrigok rodrigok changed the title [FIX] Fix custom sound cannot edit and delete problem [FIX] Cannot edit or delete custom sounds Dec 4, 2017
@rodrigok rodrigok merged commit 5feec6a into RocketChat:develop Dec 4, 2017
@ccfang ccfang deleted the fix-custom-sound-cannot-edit branch December 5, 2017 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants