• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed Javascript XF.CommentLoader

Affected version
XenForo 2.0 Beta 3

xfrocks

Well-known member
#1
JavaScript:
			if (!this.options.href)
			{
				this.href = this.$target.attr('href');
			}

			if (!this.href)
			{
				console.error('No href for %o', this.$target);
			}
If data-href is used, this.href is not set and it will trigger the console.error call.
 

Kier

XenForo Developer
Staff member
#2
I've updated the code to this:
JavaScript:
            if ($target.length)
            {
                this.$loaderTarget = $target;
            }
            else
            {
                console.error('No loader target for %o', this.$target);
                return;
            }

            this.href = this.options.href || this.$target.attr('href');

            if (!this.href)
            {
                console.error('No href for %o', this.$target);
            }