Explorar o código

fix(docs): Change Uploading Files example (#2219)

Hiago Alves %!s(int64=2) %!d(string=hai) anos
pai
achega
744f983d8c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      docs/content/developer-guide/uploading-files.md

+ 1 - 1
docs/content/developer-guide/uploading-files.md

@@ -45,7 +45,7 @@ function UploadFile() {
     if (target.validity.valid) {
     if (target.validity.valid) {
       mutate({ 
       mutate({ 
         variables: {
         variables: {
-          input: target.files.map(file => ({ file }))
+          input: Array.from(target.files).map((file) => ({ file }));
         }  
         }  
       });
       });
     }
     }