Browse Source

Quick fix for error fixed toc/title/occur

e.style is not defined. Somewhere OrgNode::hideElement() is called
for a non null object, that has no style property (???)
Sebastian Rose, Hannover, Germany 10 years ago
parent
commit
c176791dbe
1 changed files with 3 additions and 3 deletions
  1. 3 3
      code/org-info-js/org-info.js

+ 3 - 3
code/org-info-js/org-info.js

@@ -1,6 +1,6 @@
 /**
  * @file
- *       org-info.js, v.0.1.0.5
+ *       org-info.js, v.0.1.0.6
  *
  * @author Sebastian Rose, Hannover, Germany - sebastian_rose at gmx dot de
  *
@@ -124,7 +124,7 @@ OrgNode.findTargetsIn = function(safe, container)
 
 OrgNode.hideElement = function (e)
 {
-  if(e) {
+  if(e && e['style']) { // test for e['style'] is just quick fix for error elsewhere (fixed toc and title)
     e.style.display = 'none';
     e.style.visibility = 'hidden';
   }
@@ -132,7 +132,7 @@ OrgNode.hideElement = function (e)
 
 OrgNode.showElement = function (e)
 {
-  if(e) {
+  if(e && e['style']) {
     e.style.display = 'block';
     e.style.visibility = 'visible';
   }