Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5376294

Browse files
author
minjk-bl
committed
Fix catching error
1 parent6212522 commit5376294

File tree

2 files changed

+20
-13
lines changed

2 files changed

+20
-13
lines changed

‎js/board/BoardFrame.js‎

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -508,19 +508,23 @@ define([
508508

509509
file.text().then(function(data){
510510
// var parsedData = decodeURIComponent(data);
511-
varjsonList=JSON.parse(data);
512-
// load blocks
513-
that.jsonToBlock(jsonList);
514-
515-
varindexVp=vpFileName.indexOf('.vp');
516-
varsaveFileName=vpFileName.slice(0,indexVp);
517-
518-
// show title of board and path
519-
$('#vp_boardTitle').val(saveFileName);
520-
that.tmpState.boardTitle=saveFileName;
521-
that.tmpState.boardPath=vpFilePath;
522-
523-
com_util.renderSuccessMessage('Successfully opened file. ('+vpFileName+')');
511+
try{
512+
varjsonList=JSON.parse(data);
513+
// load blocks
514+
that.jsonToBlock(jsonList);
515+
516+
varindexVp=vpFileName.indexOf('.vp');
517+
varsaveFileName=vpFileName.slice(0,indexVp);
518+
519+
// show title of board and path
520+
$('#vp_boardTitle').val(saveFileName);
521+
that.tmpState.boardTitle=saveFileName;
522+
that.tmpState.boardPath=vpFilePath;
523+
524+
com_util.renderSuccessMessage('Successfully opened file. ('+vpFileName+')');
525+
}catch(ex){
526+
com_util.renderAlertModal('Not applicable file contents with vp format! (JSON)');
527+
}
524528
});
525529
});
526530
}

‎js/com/component/VarSelector.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ define([
8484
this.attributes.push({[key]:value});
8585
}
8686
setValue(value){
87+
if(value==null||value==undefined){
88+
value='';
89+
}
8790
this.defaultValue=value;
8891
if(value.includes('[')&&value.includes(']')){
8992
// divide it to variable / column

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp