From aab68cf750b8bc124bb139dea33eae3bab8a2ea8 Mon Sep 17 00:00:00 2001 From: Kenshin Date: Tue, 26 Dec 2017 14:48:26 +0800 Subject: [PATCH] Modify some copywrite. --- src/module/modals.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/module/modals.jsx b/src/module/modals.jsx index 60b99003..c0fdd54b 100644 --- a/src/module/modals.jsx +++ b/src/module/modals.jsx @@ -34,7 +34,8 @@ class Modals extends React.Component { // save modals focus option save() { console.log( "modals click submit button.", storage.current, flag ) - if ( [ "title", "include" ].findIndex( key => storage.current.site[key] == "" ) != -1 ) { + const props = storage.current.mode == "focus" ? [ "include" ] : [ "title", "include" ]; + if ( props.findIndex( key => storage.current.site[key] == "" ) != -1 ) { new Notify().Render( 3, "【标题、高亮】不能为空。" ); } else if ( Object.values( flag ).findIndex( key => key != 0 ) != -1 ) {