MOBILE-2253 core: Fix processQueue in filepool

main
Dani Palou 2017-12-08 15:42:17 +01:00
parent a1c80fb311
commit e4ed9301fb
1 changed files with 2 additions and 2 deletions

View File

@ -2269,8 +2269,8 @@ export class CoreFilepoolProvider {
*
* @return {Promise} Resolved on success. Rejected on failure.
*/
protected processImportantQueueItem() : void {
this.appDB.getRecords(this.QUEUE_TABLE, null, 'priority DESC, added ASC', null, 0, 1).then((items) => {
protected processImportantQueueItem() : Promise<any> {
return this.appDB.getRecords(this.QUEUE_TABLE, null, 'priority DESC, added ASC', null, 0, 1).then((items) => {
let item = items.pop();
if (!item) {
return Promise.reject(this.ERR_QUEUE_IS_EMPTY);