Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-20183

Prototype.js breaks the standard Array.from method

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A
    • Pull Request accepted

    Description

      Prototype.js is overriding the standard Array.from with their own implementation, breaking several functionalities.

      Array.from = $A;

      This can cause problems when trying to integrate other libraries that may use Array.from

       

      The problem can be reproduced by opening the developer console (while on a xwiki page) and trying the following code:

      Array.from([1, 2, 3], (x) => x + x);
      

       Expected result [2,4,6], in case of issue: [1,2,3]

       

      Attachments

        Issue Links

          Activity

            People

              oana.florean@xwiki.com Florean Oana-Lavinia
              oana.florean@xwiki.com Florean Oana-Lavinia
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: