fix json import
This commit is contained in:
parent
b9b9e57c41
commit
7d6acb7014
1 changed files with 1 additions and 1 deletions
|
@ -41,7 +41,7 @@ Metamaps.Import = {
|
||||||
var text = e.originalEvent.clipboardData.getData('text/plain');
|
var text = e.originalEvent.clipboardData.getData('text/plain');
|
||||||
|
|
||||||
var results;
|
var results;
|
||||||
if (text[0] === '{') {
|
if (text.trimLeft()[0] === '{') {
|
||||||
try {
|
try {
|
||||||
results = JSON.parse(text);
|
results = JSON.parse(text);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
Loading…
Reference in a new issue