File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import load from 'load.js';
66import { tryToCatch } from 'try-to-catch' ;
77import { encode } from '../../../common/entity.js' ;
88import removeExtension from './remove-extension.js' ;
9- import setListeners from './set-listeners.js ' ;
9+ import { setListeners } from './set-listeners.mjs ' ;
1010import getNextCurrentName from './get-next-current-name.js' ;
1111
1212const { DOM , CloudCmd} = globalThis ;
Original file line number Diff line number Diff line change 1- 'use strict' ;
2-
31/* global DOM */
4- const forEachKey = require ( 'for-each-key' ) ;
5-
6- const wraptile = require ( 'wraptile' ) ;
7- const format = require ( './format' ) ;
2+ import forEachKey from 'for-each-key' ;
3+ import wraptile from 'wraptile' ;
4+ import format from './format.js' ;
85
96const { Dialog, Images} = DOM ;
107
11- module . exports = ( options ) => ( emitter ) => {
8+ export const setListeners = ( options ) => ( emitter ) => {
129 const {
1310 operation,
1411 callback,
@@ -43,18 +40,20 @@ module.exports = (options) => (emitter) => {
4340 operation,
4441 } ) ) ;
4542
43+ let noProgress = true ;
4644 const listeners = {
4745 progress : ( value ) => {
4846 done = value === 100 ;
4947 progress . setProgress ( value ) ;
48+ noProgress = false ;
5049 } ,
5150
5251 end : ( ) => {
5352 Images . hide ( ) ;
5453 forEachKey ( removeListener , listeners ) ;
5554 progress . remove ( ) ;
5655
57- if ( lastError || done )
56+ if ( lastError || done || noProgress )
5857 callback ( ) ;
5958 } ,
6059
You can’t perform that action at this time.
0 commit comments