Skip to content

Commit

Permalink
avoid empty progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
leyhline committed Jun 24, 2023
1 parent cfc5b8a commit 0bd947d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion example.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ try {
worker = await MecabWorker.create(
{ url: "../ipadic-2.7.0_bin.zip", cacheName: "ipadic-2.7.0_bin" },
(message) => {
if (message.total) {
if (size && message.total) {
size += message.size;
progressElement.value = size;
progressElement.max = message.total;
Expand Down

0 comments on commit 0bd947d

Please sign in to comment.