Jelajahi Sumber

fix foreach in fileupload

Christoph Scholz 6 tahun lalu
induk
melakukan
038359c74f
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      src/headless/converse-chatboxes.js

+ 1 - 1
src/headless/converse-chatboxes.js

@@ -626,7 +626,7 @@ converse.plugins.add('converse-chatboxes', {
                     });
                     });
                     return;
                     return;
                 }
                 }
-                files.forEach(file => {
+                Array.from(files).forEach(file => {
                     if (!window.isNaN(max_file_size) && window.parseInt(file.size) > max_file_size) {
                     if (!window.isNaN(max_file_size) && window.parseInt(file.size) > max_file_size) {
                         return this.messages.create({
                         return this.messages.create({
                             'message': __('The size of your file, %1$s, exceeds the maximum allowed by your server, which is %2$s.',
                             'message': __('The size of your file, %1$s, exceeds the maximum allowed by your server, which is %2$s.',