Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Use textContent rather than firstChild.data to avoid an exception whe…

…n the title element has no children.
  • Loading branch information...
Ms2ger committed Apr 13, 2013
1 parent 5c6788e commit 4d2322948478763734ab268282b0a87879cea002
Showing with 1 addition and 1 deletion.
  1. +1 −1 testharness.js
@@ -399,7 +399,7 @@ policies and contribution forms [3].
{
//Don't use document.title to work around an Opera bug in XHTML documents
var prefix = document.getElementsByTagName("title").length > 0 ?
document.getElementsByTagName("title")[0].firstChild.data :
document.getElementsByTagName("title")[0].textContent :
"Untitled";
var suffix = name_counter > 0 ? " " + name_counter : "";
name_counter++;

0 comments on commit 4d23229

Please sign in to comment.
You can’t perform that action at this time.