Skip to content
This repository has been archived by the owner on Oct 4, 2022. It is now read-only.

Commit

Permalink
Don't use overallScore if it isn't set
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Timmermans committed Nov 2, 2015
1 parent e9481fb commit 7ce7ea4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
10 changes: 7 additions & 3 deletions dist/yoast-seo.js
Original file line number Diff line number Diff line change
Expand Up @@ -2130,10 +2130,14 @@ YoastSEO.ScoreFormatter.prototype.sortScores = function() {
*/
YoastSEO.ScoreFormatter.prototype.outputOverallScore = function() {
var overallTarget = document.getElementById( this.overallTarget );
overallTarget.className = "overallScore " + this.scoreRating( Math.round( this.overallScore ) );
if ( this.keyword === "" ) {
overallTarget.className = "overallScore " + this.scoreRating( "na" );

if ( overallTarget ) {
overallTarget.className = "overallScore " + this.scoreRating( Math.round( this.overallScore ) );
if ( this.keyword === "" ) {
overallTarget.className = "overallScore " + this.scoreRating( "na" );
}
}

this.saveScores( this.overallScore );
};

Expand Down
Loading

0 comments on commit 7ce7ea4

Please sign in to comment.