From 21f9f80f3dbd60b3d1830f03f6abc2b2a5d376c7 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Tue, 14 Dec 2021 23:40:01 +0100 Subject: [PATCH] [editor] Fix: Removing cooldown resulted in save error Signed-off-by: Knut Ahlers --- src/rules.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/rules.vue b/src/rules.vue index 81390b0..202bcf3 100644 --- a/src/rules.vue +++ b/src/rules.vue @@ -870,14 +870,20 @@ export default { if (obj.cooldown) { obj.cooldown = this.fixDurationRepresentationToInt64(obj.cooldown) + } else { + delete obj.cooldown } if (obj.channel_cooldown) { obj.channel_cooldown = this.fixDurationRepresentationToInt64(obj.channel_cooldown) + } else { + delete obj.channel_cooldown } if (obj.user_cooldown) { obj.user_cooldown = this.fixDurationRepresentationToInt64(obj.user_cooldown) + } else { + delete obj.user_cooldown } let promise = null