Merge pull request #529 from metamaps/fix/import-fixes

fix json import
This commit is contained in:
Devin Howard 2016-04-01 13:37:43 +08:00
commit f21a3d114f

View file

@ -41,7 +41,7 @@ Metamaps.Import = {
var text = e.originalEvent.clipboardData.getData('text/plain');
var results;
if (text[0] === '{') {
if (text.trimLeft()[0] === '{') {
try {
results = JSON.parse(text);
} catch (e) {