Explorar o código

return if canceled in the website example too

Artur Paikin %!s(int64=6) %!d(string=hai) anos
pai
achega
9e219784dc
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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)
       )