Skip to content

Commit f828720

Browse files
committed
Clean up.
1 parent 96ceac4 commit f828720

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

editor/js/Menubar.File.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,11 @@ Menubar.File = function ( editor ) {
8686
}
8787

8888
var output = geometry.toJSON();
89+
8990
try {
9091
output = JSON.stringify( output, null, '\t' );
9192
output = output.replace( /[\n\t]+([\d\.e\-\[\]]+)/g, '$1' );
92-
} catch ( oops ) {
93+
} catch ( e ) {
9394
output = JSON.stringify( output );
9495
}
9596

@@ -115,10 +116,11 @@ Menubar.File = function ( editor ) {
115116
}
116117

117118
var output = object.toJSON();
119+
118120
try {
119121
output = JSON.stringify( output, null, '\t' );
120122
output = output.replace( /[\n\t]+([\d\.e\-\[\]]+)/g, '$1' );
121-
} catch ( oops ) {
123+
} catch ( e ) {
122124
output = JSON.stringify( output );
123125
}
124126

@@ -135,10 +137,11 @@ Menubar.File = function ( editor ) {
135137
option.onClick( function () {
136138

137139
var output = editor.scene.toJSON();
140+
138141
try {
139142
output = JSON.stringify( output, null, '\t' );
140143
output = output.replace( /[\n\t]+([\d\.e\-\[\]]+)/g, '$1' );
141-
} catch ( oops ) {
144+
} catch ( e ) {
142145
output = JSON.stringify( output );
143146
}
144147

0 commit comments

Comments
 (0)