froala / angular-froala-wysiwyg

Angular 4, 5, 6, 7, 8 and 9 plugin for Froala WYSIWYG HTML Rich Text Editor.
https://froala.com/wysiwyg-editor
729 stars 200 forks source link

Build warnings under Angular 17 #537

Open russelg opened 7 months ago

russelg commented 7 months ago

angular-froala-wysiwyg/froala v4.1.3.

I have been seeing this warning when building my angular projects that use Froala:

▲ [WARNING] This case clause will never be evaluated because it duplicates an earlier case clause [duplicate-case]

    angular:script/global:scripts.js:10:622815:
      10 │ ...tFileIcon("jpegIcon");case"image/jpeg":return k.icon.getFileIco...
         ╵                              ~~~~~~~~~~~~
  The earlier case clause is here:

    angular:script/global:scripts.js:10:622760:
      10 │ ...etFileIcon("gifIcon");case"image/jpeg":return k.icon.getFileIco...
         ╵                              ~~~~~~~~~~~~

The code in question it is complaining about comes from Froala (specifically the filesManager plugin): image

Not sure if this report belongs in the angular repo, or the editor repo (https://github.com/froala/wysiwyg-editor). However, this warning was not visible until we updated to angular 17 (and therefore esbuild as the builder).