You are here

seoHrefLangHasNoXDefault

Used by the following Containers: 
Variable Type: 
Custom Javascript
It seems this hrefLang has no x-default url associated with it.
	function() {
  	var seoHrefLangIsDefined = {{seoHrefLangIsDefined}};

	if (seoHrefLangIsDefined) {
      	// the seed data
      	var seoHrefLang = {{seoHrefLang}};
      	var seoHrefLangLength = {{seoHrefLangLength}};
		// default result
      	var seoTestHrefLangHasNoXDefault = true;
      	var i;
		for ( i = 0; i < seoHrefLangLength ; i++ ) {
          	if ( seoHrefLang[i].hreflang == 'x-default' ) {
              	seoTestHrefLangHasNoXDefault = false;
          	}
      	}
      	return seoTestHrefLangHasNoXDefault;
	} else {
		return undefined;
	}
}