Browse Source

fix: save assets block validation

Ahmad Kholid 2 years ago
parent
commit
36e3b39f0f
1 changed files with 2 additions and 1 deletions
  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;
 }