Skip to content
This repository has been archived by the owner on Sep 19, 2018. It is now read-only.

Commit

Permalink
Use textContent rather than firstChild.data to avoid an exception whe…
Browse files Browse the repository at this point in the history
…n the title element has no children.
  • Loading branch information
Ms2ger committed Apr 13, 2013
1 parent 5c6788e commit 4d23229
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion testharness.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ policies and contribution forms [3].
{ {
//Don't use document.title to work around an Opera bug in XHTML documents //Don't use document.title to work around an Opera bug in XHTML documents
var prefix = document.getElementsByTagName("title").length > 0 ? var prefix = document.getElementsByTagName("title").length > 0 ?
document.getElementsByTagName("title")[0].firstChild.data : document.getElementsByTagName("title")[0].textContent :
"Untitled"; "Untitled";
var suffix = name_counter > 0 ? " " + name_counter : ""; var suffix = name_counter > 0 ? " " + name_counter : "";
name_counter++; name_counter++;
Expand Down

0 comments on commit 4d23229

Please sign in to comment.