diff options
| author | Matthew Noorenberghe <github@matthew.noorenberghe.com> | 2014-02-24 13:02:57 -0800 |
|---|---|---|
| committer | Matthew Noorenberghe <github@matthew.noorenberghe.com> | 2014-02-24 13:02:59 -0800 |
| commit | a7c6ff1c31c93ec11aab2f6e751342d189d8a54e (patch) | |
| tree | 0867d146d7512d637ebd627c1f9d8fd06b395962 | |
| parent | 4b09a810bd7b8dbe1324e8fddd7da4917f6473b6 (diff) | |
| download | webtrees-a7c6ff1c31c93ec11aab2f6e751342d189d8a54e.tar.gz webtrees-a7c6ff1c31c93ec11aab2f6e751342d189d8a54e.tar.bz2 webtrees-a7c6ff1c31c93ec11aab2f6e751342d189d8a54e.zip | |
nameElement (and likely remElement) can be null
e.g. when assigned to by code with document.getElementById("nonexistent")
| -rw-r--r-- | js/webtrees-1.5.2.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/webtrees-1.5.2.js b/js/webtrees-1.5.2.js index 2d7281f158..770d40f9a9 100644 --- a/js/webtrees-1.5.2.js +++ b/js/webtrees-1.5.2.js @@ -1377,10 +1377,10 @@ function paste_id(value) { } function pastename(name) { - if (typeof(nameElement) != "undefined") { + if (nameElement) { nameElement.innerHTML = name; } - if (typeof(remElement) != "undefined") { + if (remElement) { remElement.style.display = "block"; } } |
