From 61a7dbbe03b7690f2ab8b6286218ae90fff28da4 Mon Sep 17 00:00:00 2001 From: robinknaapen Date: Sat, 16 Sep 2017 21:41:53 +0200 Subject: [PATCH] Remove redundant else --- serializer.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/serializer.js b/serializer.js index dac92b7..6aad771 100644 --- a/serializer.js +++ b/serializer.js @@ -37,11 +37,10 @@ class SerializerField { } else if(this.type == "checkbox") { let checked = this.field.checked; if(this.field.hasAttribute("string")){ - if(checked) { - return this.field.value - } else { + if(!checked) { return null; } + return this.field.value } return checked; } else {