Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Michael Chart 13 posts 94 karma points
    May 18, 2018 @ 15:14
    Michael Chart
    1

    Javascript error on staging environment

    Hi Alan,

    We have been trying out uMunge and found an error that occur on our staging site (when ClientDependency has minified the Javascript). The error that shows is:

    ReferenceError: gaEvent is not defined

    I think there are actually 2 issues in the javascript that are both due to variables that are used without being defined using var. I guess this means they are ending up in the global scope, but something in the ClientDependency minification means that these variables are no longer accessible when they are used later in the code.

    The first one is here (uMungeDashboardController.js:26):

        gaEvent = function (evName, evLabel, evValue) {
    

    This should be var gaEvent at the start. And likewise here (uMungeDashboardController:374):

            for (assemblyBigName in buildInfo) {
    

    Should be var assemblyBigName.

    Thanks for making this package - certainly useful as we're working out how we can comply with the GDPR.

  • Alan Mitchell 57 posts 281 karma points c-trib
    May 24, 2018 @ 13:04
    Alan Mitchell
    100

    Hi Michael,

    Thanks for the really constructive feedback - sorry about this bug which we didn't notice when testing locally.

    We've implemented your suggested changes and published a new version available for download now.

    All the best!

    Alan

Please Sign in or register to post replies

Write your reply to:

Draft