error msg for invalid gist id

pull/1/head
LianaHus 6 years ago
parent ed28bcf159
commit f64b8a62b2
  1. 4
      src/lib/gist-handler.js

@ -12,11 +12,13 @@ function GistHandler (_window) {
var gistId var gistId
if (params['gist'] === '') { if (params['gist'] === '') {
loadingFromGist = true loadingFromGist = true
modalDialogCustom.prompt(null, 'Enter the ID of the Gist you would like to load.', null, (target) => { modalDialogCustom.prompt(null, 'Enter the ID of the Gist or URL you would like to load.', null, (target) => {
if (target !== '') { if (target !== '') {
gistId = getGistId(target) gistId = getGistId(target)
if (gistId) { if (gistId) {
cb(gistId) cb(gistId)
} else {
modalDialogCustom.alert('Error while loading gist. Please provide a valid Gist ID or URL.')
} }
} }
}) })

Loading…
Cancel
Save