Browse Source

Merge pull request #762 from Arantor/release-2.1

! Draft autosaving should not just assume the checkboxes exist because s...
Arantor 11 years ago
parent
commit
521b635a21
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Themes/default/scripts/drafts.js

+ 2 - 2
Themes/default/scripts/drafts.js

@@ -102,9 +102,9 @@ smf_DraftAutoSave.prototype.draftSave = function ()
 	// Get the locked an/or sticky values if they have been selected or set that is
 	if (this.opt.sType == 'post')
 	{
-		if (document.getElementById('check_lock').checked)
+		if (document.getElementById('check_lock') && document.getElementById('check_lock').checked)
 			aSections[aSections.length] = 'lock=1';
-		if (document.getElementById('check_sticky').checked)
+		if (document.getElementById('check_sticky') && document.getElementById('check_sticky').checked)
 			aSections[aSections.length] = 'sticky=1';
 	}