while (x !== null) results in error
<p>I am using a third party calendar app that is throwing an error in Firefox that reads "<strong>Permission denied to access property 'parentNode'</strong>". In Safari I'm getting "<strong>TypeError: 'undefined' is not any object (evaluating 't.parentNode')</strong>". Here is my while loop. Note: <em>I did not write this code but I am attempting to fix it and failing.</em> </p>

<pre><code>while (t.parentNode !== null) {
    if (t.id === this.divName) {                
        return true;
    }

    t = t.parentNode;
}
</code></pre>

<p>Any help is much appreciated!</p>
