@onehat/data 1.15.1 → 1.15.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/Repository/Ajax.js
CHANGED
|
@@ -132,6 +132,7 @@ class AjaxRepository extends Repository {
|
|
|
132
132
|
|
|
133
133
|
this.registerEvents([
|
|
134
134
|
'beforeLoad',
|
|
135
|
+
'connectionError',
|
|
135
136
|
]);
|
|
136
137
|
|
|
137
138
|
// Respond to Repository events
|
|
@@ -835,7 +836,7 @@ class AjaxRepository extends Repository {
|
|
|
835
836
|
console.log(url + ' error', error);
|
|
836
837
|
console.log('response:', error.response);
|
|
837
838
|
}
|
|
838
|
-
this.emit('
|
|
839
|
+
this.emit('connectionError', error);
|
|
839
840
|
});
|
|
840
841
|
}
|
|
841
842
|
|
|
@@ -16,11 +16,11 @@ class OfflineRepository extends MemoryRepository {
|
|
|
16
16
|
|
|
17
17
|
constructor(config = {}) {
|
|
18
18
|
super(...arguments);
|
|
19
|
-
|
|
19
|
+
|
|
20
20
|
const defaults = {
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
isAutoLoad: true,
|
|
23
|
+
isAutoSave: true,
|
|
24
24
|
|
|
25
25
|
};
|
|
26
26
|
_.merge(this, defaults, config);
|