File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 5
5
* Created Date: 2024-03-23 13:03:16
6
6
* Author: 3urobeat
7
7
*
8
- * Last Modified: 2024-09-01 11:24:30
8
+ * Last Modified: 2024-09-01 12:23:58
9
9
* Modified By: 3urobeat
10
10
*
11
11
* Copyright (c) 2024 3urobeat <https://github.com/3urobeat>
408
408
// Indicate result, reset fields on success and force refresh history
409
409
const res = makeCommitResponse .data .value ! ;
410
410
411
- console .log (res );
412
-
413
411
if (! res .commitResponse && ! res .dummyCommitResponse ) { // If both are null, both have succeeded
414
412
// Indicate success
415
413
responseIndicatorSuccess ();
416
414
417
- // Reset fields
415
+ // Reset fields. Explicitly check for undefined to also clear fields containing 0 (which would obv cast to false)
418
416
selectedProject .value .details .forEach ((detail ) => {
419
417
detail .value = " " ;
420
- if (detail .email ) detail .email = undefined ;
421
- if (detail .lineDiffPlus ) detail .lineDiffPlus = undefined ;
422
- if (detail .lineDiffMinus ) detail .lineDiffMinus = undefined ;
418
+ if (detail .email != undefined ) detail .email = undefined ;
419
+ if (detail .lineDiffPlus != undefined ) detail .lineDiffPlus = undefined ;
420
+ if (detail .lineDiffMinus != undefined ) detail .lineDiffMinus = undefined ;
423
421
});
424
422
425
423
// Remove project name from changesMade array
You can’t perform that action at this time.
0 commit comments