Skip to content

Commit 39aff07

Browse files
committed
linter fixes
1 parent 9b56b8e commit 39aff07

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/api-umbrella/admin-ui/app/services/duplicate-record.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,21 @@ export default class DuplicateRecordService extends Service {
2323
const attrs = {};
2424

2525
modelClass.eachAttribute((name) => {
26-
if (exclude.has(name)) {
26+
if(exclude.has(name)) {
2727
return;
2828
}
2929
const value = source.get(name);
3030
attrs[name] = this._isPlainStructure(value) ? cloneDeep(value) : value;
3131
});
3232

3333
modelClass.eachRelationship((name, descriptor) => {
34-
if (exclude.has(name)) {
34+
if(exclude.has(name)) {
3535
return;
3636
}
3737
const related = source.get(name);
38-
if (descriptor.kind === 'belongsTo') {
38+
if(descriptor.kind === 'belongsTo') {
3939
attrs[name] = related ? this._cloneRecord(descriptor.type, related) : null;
40-
} else if (descriptor.kind === 'hasMany') {
40+
} else if(descriptor.kind === 'hasMany') {
4141
attrs[name] = (related || []).map((child) => this._cloneRecord(descriptor.type, child));
4242
}
4343
});
@@ -46,10 +46,10 @@ export default class DuplicateRecordService extends Service {
4646
}
4747

4848
_isPlainStructure(value) {
49-
if (value === null || value === undefined) {
49+
if(value === null || value === undefined) {
5050
return false;
5151
}
52-
if (Array.isArray(value)) {
52+
if(Array.isArray(value)) {
5353
return true;
5454
}
5555
return typeof value === 'object' && value.constructor === Object;

src/api-umbrella/admin-ui/app/utils/duplicable-new-route.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export default function duplicableNewRoute(SuperClass) {
4141

4242
async model(params) {
4343
let record;
44-
if (params.duplicate_id) {
44+
if(params.duplicate_id) {
4545
record = await this.duplicateRecord.cloneFromId(this.duplicateModelName, params.duplicate_id);
4646
} else {
4747
clearStoreCache(this.store);
@@ -52,7 +52,7 @@ export default function duplicableNewRoute(SuperClass) {
5252

5353
afterModel(resolved) {
5454
const record = this.modelFromResolved(resolved);
55-
if (record && record._duplicatedFromName) {
55+
if(record && record._duplicatedFromName) {
5656
success({
5757
title: 'Duplicated',
5858
text: `Duplicated from ${record._duplicatedFromName}`,

0 commit comments

Comments
 (0)