Permalink
Browse files

fixed; appendChild of null error

GH #36
  • Loading branch information...
wavded committed Jan 10, 2013
1 parent 1cc233b commit 2dc08ccab82b73571518c2655ebf0fc722fbc692
Showing with 11 additions and 1 deletion.
  1. +2 −1 humane.js
  2. +9 −0 test/issue36.html
View
@@ -53,7 +53,7 @@
this.waitForMove = o.waitForMove || false
this.clickToClose = o.clickToClose || false
this.forceNew = o.forceNew || false
- this.container = o.container || doc.body
+ this.container = o.container
try { this._setupEl() } // attempt to setup elements
catch (e) {
@@ -66,6 +66,7 @@
_setupEl: function () {
var el = doc.createElement('div')
el.style.display = 'none'
+ if (!this.container) this.container = doc.body
this.container.appendChild(el)
this.el = el
this.removeEvent = ENV.bind(this.remove,this)
View
@@ -0,0 +1,9 @@
+<html>
+<head>
+<link href='../themes/bigbox.css' rel='stylesheet'>
+<script src='../humane.js'></script>
+</head>
+<script>
+humane.log("Hello");
+</script>
+</html>

0 comments on commit 2dc08cc

Please sign in to comment.