mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-14 17:49:52 +00:00
Add chunk name
This commit is contained in:
@@ -70,6 +70,7 @@ export default class App extends Component<Props, State> {
|
|||||||
});
|
});
|
||||||
|
|
||||||
window.addEventListener('popstate', this.onPopState);
|
window.addEventListener('popstate', this.onPopState);
|
||||||
|
/* webpackChunkName: "client-api" */
|
||||||
import('./client-api').then(m => m.exposeAPI(this));
|
import('./client-api').then(m => m.exposeAPI(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -396,7 +396,6 @@ export default class Compress extends Component<Props, State> {
|
|||||||
const processor = this.leftProcessor;
|
const processor = this.leftProcessor;
|
||||||
|
|
||||||
this.setState({ loadingCounter, loading: true }, this.signalProcessingStart);
|
this.setState({ loadingCounter, loading: true }, this.signalProcessingStart);
|
||||||
// this.signalProcessingStart();
|
|
||||||
// Abort any current encode jobs, as they're redundant now.
|
// Abort any current encode jobs, as they're redundant now.
|
||||||
this.leftProcessor.abortCurrent();
|
this.leftProcessor.abortCurrent();
|
||||||
this.rightProcessor.abortCurrent();
|
this.rightProcessor.abortCurrent();
|
||||||
@@ -444,9 +443,7 @@ export default class Compress extends Component<Props, State> {
|
|||||||
this.updateDocumentTitle(file.name);
|
this.updateDocumentTitle(file.name);
|
||||||
this.setState(newState);
|
this.setState(newState);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (err.name === 'AbortError') {
|
if (err.name === 'AbortError') return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
console.error(err);
|
console.error(err);
|
||||||
// Another file has been opened/processed before this one processed.
|
// Another file has been opened/processed before this one processed.
|
||||||
if (this.state.loadingCounter !== loadingCounter) return;
|
if (this.state.loadingCounter !== loadingCounter) return;
|
||||||
@@ -468,8 +465,7 @@ export default class Compress extends Component<Props, State> {
|
|||||||
|
|
||||||
this.updateImageTimeoutIds[index] = self.setTimeout(
|
this.updateImageTimeoutIds[index] = self.setTimeout(
|
||||||
() => {
|
() => {
|
||||||
this.updateImage(index, options)
|
this.updateImage(index, options) .catch((err) => {
|
||||||
.catch((err) => {
|
|
||||||
console.error(err);
|
console.error(err);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user