Skip to content
Snippets Groups Projects
Unverified Commit 8bc925c4 authored by Paul Kaplan's avatar Paul Kaplan Committed by GitHub
Browse files

Merge pull request #1551 from kchadha/http-url

Allow http url in import modal
parents cd91a237 1adf6b24
No related branches found
No related tags found
No related merge requests found
......@@ -51,7 +51,7 @@ class ImportModal extends React.Component {
this.setState({inputValue: e.target.value, hasValidationError: false});
}
validate (input) {
const urlMatches = input.match(/^(?:https:\/\/)?scratch\.mit\.edu\/projects\/(\d+)/);
const urlMatches = input.match(/^(?:https?:\/\/)?scratch\.mit\.edu\/projects\/(\d+)/);
if (urlMatches && urlMatches.length > 0) {
return urlMatches[1];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment