From 3badac40753b4e938d3ecfc2248fd3e3d5a71294 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Sat, 10 Sep 2016 17:47:14 +0100 Subject: [PATCH] Raise nice error if an unsupported URL import was attempted --- src/app/compiler.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app/compiler.js b/src/app/compiler.js index 357d534797..a18e2ab44d 100644 --- a/src/app/compiler.js +++ b/src/app/compiler.js @@ -250,6 +250,9 @@ function Compiler (editor, handleGithubCall) { cb(null, 'Unable to import "' + m + '"'); }); return; + } else if (/^[^:]*:\/\//.exec(m)) { + cb(null, 'Unable to import "' + m + '": Unsupported URL'); + return; } else { cb(null, 'Unable to import "' + m + '"'); return;