Pārlūkot izejas kodu

! Draft autosaving should not just assume the checkboxes exist because sometimes they won't. Fixes #761

Signed-off-by: Peter Spicer <[email protected]>
Peter Spicer 11 gadi atpakaļ
vecāks
revīzija
6f4bad8268
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  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';
 	}