Skip to content

Commit

Permalink
Existence check document for non-browser
Browse files Browse the repository at this point in the history
  • Loading branch information
deathcap committed Jan 20, 2014
1 parent 20131af commit 438cb7e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
14 changes: 7 additions & 7 deletions index.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ class ChestDialog extends ModalDialog
@chestIW.linkedInventory = @playerInventory
@playerIW.linkedInventory = @chestInventory

chestCont = @chestIW.createContainer()
if document?
chestCont = @chestIW.createContainer()

contents = []
contents.push chestCont
contents.push document.createElement('br') # TODO: better positioning
# player inventory at bottom
contents.push @playerIW.createContainer()
contents = []
contents.push chestCont
contents.push document.createElement('br') # TODO: better positioning
# player inventory at bottom
contents.push @playerIW.createContainer()

console.log 'ChestDialog, super=',super
super game, {contents: contents}

loadBlockdata: (x, y, z) ->
Expand Down
13 changes: 7 additions & 6 deletions index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 438cb7e

Please sign in to comment.