@MaartenStaa opened this Pull Request on July 10th 2017

This fixes the error 'Mismatched anonymous define() module' when another identical looking define call occurs on the same page.

In particular, this happened to me in Moodle where there was a define(function() { return g }) from another minified Javascript, causing some kind of conflict with Piwik which happened to also be minified as define(function() { return g }).

@mattab commented on August 3rd 2017 Owner

Hi @MaartenStaa
Thanks for the PR.
Do you maybe have a small script that we could use to reproduce the original issue, and see that it has been fixed with your PR?

@sgiehl a couple of tests are failing with:

Piwik\Tests\Integration\JsProxyTest::testPiwik_WhiteLabelledJs_HasNoComment script content (if comment shows, $byteStart value in /js/tracker.php)
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
 /*!! <a class='mention' href='https://github.com/license'>@license</a>-end */

Could it be due to the removal of line endings?

@mattab commented on November 20th 2017 Owner

Hi @MaartenStaa
Could you please take a look at my comment above? thanks

@mattab commented on December 14th 2017 Owner

As we haven't heard back from @MaartenStaa, will close the pull request for now. If you can, please ask us to re-open or re-create the PR answering the questions, thanks :+1:

This Pull Request was closed on December 14th 2017
Powered by GitHub Issue Mirror