Parcourir la source

return if canceled in the website example too

Artur Paikin il y a 6 ans
Parent
commit
9e219784dc
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2 0
      website/src/examples/markdown-snippets/app.es6

+ 2 - 0
website/src/examples/markdown-snippets/app.es6

@@ -111,6 +111,7 @@ class MarkdownTextarea {
         template_id: TRANSLOADIT_EXAMPLE_TEMPLATE
       }
     }).then((result) => {
+      if (result === null) return
       this.insertAttachments(
         this.matchFilesAndThumbs(result.results)
       )
@@ -135,6 +136,7 @@ class MarkdownTextarea {
         'dropbox'
       ]
     }).then((result) => {
+      if (result === null) return
       this.insertAttachments(
         this.matchFilesAndThumbs(result.results)
       )