File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -214,11 +214,25 @@ class RegEdit extends App {
214
214
const elements =
215
215
event . srcElement . parentElement
216
216
. children ;
217
+ try {
218
+ anura . settings . cache [
219
+ elements [ 0 ] . innerText
220
+ ] = JSON . parse (
221
+ elements [ 2 ] . value ,
222
+ ) ;
223
+ anura . settings . save ( ) ;
224
+ } catch ( e ) {
225
+ elements [ 2 ] . value =
226
+ anura . settings . cache [
227
+ elements [ 0 ] . innerText
228
+ ] ;
229
+ anura . notifications . add ( {
230
+ title : "RegEdit Error" ,
231
+ description : `Failed to set value for ${ elements [ 0 ] . innerText } , invalid input` ,
232
+ timeout : 50000 ,
233
+ } ) ;
234
+ }
217
235
218
- anura . settings . cache [
219
- elements [ 0 ] . innerText
220
- ] = JSON . parse ( elements [ 2 ] . value ) ;
221
- anura . settings . save ( ) ;
222
236
// console.log(JSON.parse(event.srcElement.value));
223
237
console . log ( "blur" , event ) ;
224
238
} }
You can’t perform that action at this time.
0 commit comments