@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 */
-};
-'
+};'
/home/travis/build/piwik/piwik/tests/PHPUnit/Integration/JsProxyTest.php:47

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

Powered by GitHub Issue Mirror