• Resolved vixperth

    (@vixperth)


    Recently this plugin has started throwing some javascript errors in the console when trying to use the inline svgs. I am getting the error message “Uncaught TypeError: Cannot read property ‘endsWith’ of undefined at Object.<anonymous> (svgs-inline.js?ver=1.0.0:63)”

    This relates to this call `if (!imgURL.endsWith(‘svg’)) {
    return;
    }`

    It would appear that the $target variable set above this section is not getting the correct data and none of the img variables wind up being defined.

    Changing the target to simply ‘img.style-svg’ clears the error, but that removes the option to select your own class etc.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Benbodhi

    (@benbodhi)

    Hi there,

    Firstly, sorry for the insanely late reply! I’ve been slow lately, but I didn’t even get a notification about your post.

    Thanks for pointing this out. This should be addressed in the next update.

    Plugin Author Benbodhi

    (@benbodhi)

    Hi there,
    Are you still having issues with this? I can’t see any problems after having a dig… so I dare say this was a conflict of another plugin or theme.

    I’ll mark as resolved, but please do just let me know if you still face issues, I’m more than happy to help out.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Javascript Error Inline SVG’ is closed to new replies.