mirror of
https://github.com/nasa/openmct.git
synced 2025-06-19 15:43:48 +00:00
New eslint rules auto fix (#3058)
* no-implicit-coercion and no-unneeded-ternary * End every line with a semicolon * Spacing and formatting * Enabled semi-spacing * Applies npm run lint:fix to code after master merge * Fix merge issues * Switched operator-linebreak to 'before' Co-authored-by: Joshi <simplyrender@gmail.com>
This commit is contained in:
@ -40,6 +40,7 @@ export default class Editor extends EventEmitter {
|
||||
if (this.editing === true) {
|
||||
throw "Already editing";
|
||||
}
|
||||
|
||||
this.editing = true;
|
||||
this.getTransactionService().startTransaction();
|
||||
this.emit('isEditing', true);
|
||||
@ -59,11 +60,12 @@ export default class Editor extends EventEmitter {
|
||||
* @private
|
||||
*/
|
||||
save() {
|
||||
return this.getTransactionService().commit().then((result)=>{
|
||||
return this.getTransactionService().commit().then((result) => {
|
||||
this.editing = false;
|
||||
this.emit('isEditing', false);
|
||||
return result
|
||||
}).catch((error)=>{
|
||||
|
||||
return result;
|
||||
}).catch((error) => {
|
||||
throw error;
|
||||
});
|
||||
}
|
||||
@ -88,6 +90,7 @@ export default class Editor extends EventEmitter {
|
||||
if (!this.transactionService) {
|
||||
this.transactionService = this.openmct.$injector.get('transactionService');
|
||||
}
|
||||
|
||||
return this.transactionService;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user