Skip to content

Commit 800a51a

Browse files
committed
adjust script
1 parent e3e0dda commit 800a51a

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/js-multi-data-module.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
/*eslint no-console: "off"*/
22

3-
import Promise from 'es6-promise';
4-
53
export default class MULTI_DATA_MODULE {
64

75
constructor(options={}){
@@ -34,7 +32,7 @@ export default class MULTI_DATA_MODULE {
3432

3533
// Data obj.
3634
this.DataFix = [];
37-
this.DataList = {};
35+
this.DataList = [];
3836

3937
// Set callback functions.
4038
if(!options.on){
@@ -84,7 +82,7 @@ export default class MULTI_DATA_MODULE {
8482
window.callback = (response)=>{
8583
resolve(response);
8684
};
87-
setTimeout(()=>{ reject('error'); }, this.Config.fetch_timeout);
85+
setTimeout(()=>{ reject('error: timeout'); }, this.Config.fetch_timeout);
8886

8987
} else {
9088
reject('error:not found data.');
@@ -181,7 +179,7 @@ export default class MULTI_DATA_MODULE {
181179
xhr.open('GET', _url, true);
182180
xhr.send(null);
183181

184-
setTimeout(()=>{ reject('error'); }, this.Config.fetch_timeout);
182+
setTimeout(()=>{ reject('error: timeout'); }, this.Config.fetch_timeout);
185183

186184
} else {
187185
reject('error:not found data.');
@@ -301,7 +299,7 @@ export default class MULTI_DATA_MODULE {
301299
xhr.responseType = 'document';
302300
xhr.send(null);
303301

304-
setTimeout(()=>{ reject('error'); }, this.Config.fetch_timeout);
302+
setTimeout(()=>{ reject('error: timeout'); }, this.Config.fetch_timeout);
305303
});
306304

307305
promise

0 commit comments

Comments
 (0)