From c4c4b5638e0cb4aaf6a777367eab3e5cc2eb5a5e Mon Sep 17 00:00:00 2001 From: eight Date: Thu, 9 Nov 2017 07:20:57 +0800 Subject: [PATCH] Refactor: isUsercss --- edit/edit.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/edit/edit.js b/edit/edit.js index c232271f..fc17dc50 100644 --- a/edit/edit.js +++ b/edit/edit.js @@ -1352,13 +1352,10 @@ function setStyleMeta(style) { } function isUsercss(style) { - if (style.usercssData) { - return true; - } - if (!style.id && prefs.get('newStyleInUsercss')) { - return true; - } - return false; + return ( + style.usercssData || + !style.id && prefs.get('newStyleInUsercss') + ); } function initWithSectionStyle({style, codeIsUpdated}) {