Skip to content

Commit 9dd90be

Browse files
author
Larry Botha
committed
chore(util.js): format
1 parent bd981e3 commit 9dd90be

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/util.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import {dequal as isEqual} from 'dequal/lite';
22

33
function subscribeOnce(observable) {
4-
return new Promise((resolve) => {
4+
return new Promise(resolve => {
55
observable.subscribe(resolve)(); // immediately invoke to unsubscribe
66
});
77
}
88

99
function update(object, path, value) {
10-
object.update((o) => {
10+
object.update(o => {
1111
set(o, path, value);
1212
return o;
1313
});
@@ -46,7 +46,7 @@ function getErrorsFromSchema(initialValues, schema, errors = {}) {
4646
errors[key] = getErrorsFromSchema(
4747
initialValues[key],
4848
schema[key].fields,
49-
Object.assign({}, errors[key]),
49+
{...errors[key]},
5050
);
5151
break;
5252
}
@@ -77,7 +77,7 @@ const deepEqual = isEqual;
7777

7878
function assignDeep(object, value) {
7979
if (Array.isArray(object)) {
80-
return object.map((o) => assignDeep(o, value));
80+
return object.map(o => assignDeep(o, value));
8181
}
8282
const copy = {};
8383
for (const key in object) {

0 commit comments

Comments
 (0)