浏览代码

fix: save assets block validation

Ahmad Kholid 2 年之前
父节点
当前提交
36e3b39f0f
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/newtab/utils/blocksValidation.js

+ 2 - 1
src/newtab/utils/blocksValidation.js

@@ -247,7 +247,8 @@ export async function validateSaveAssets(data) {
     errors.push(
       "Don't have download permission (ignore if you already grant the permissions)"
     );
-  else if (isEmptyStr(data.selector)) errors.push('The Selector is empty');
+  else if (isEmptyStr(data.selector) && data.type === 'element')
+    errors.push('The Selector is empty');
 
   return errors;
 }