diff --git a/app/models/CocoModel.coffee b/app/models/CocoModel.coffee index ff601bcb5..2418ae9c4 100644 --- a/app/models/CocoModel.coffee +++ b/app/models/CocoModel.coffee @@ -110,7 +110,7 @@ class CocoModel extends Backbone.Model save: (attrs, options) -> options ?= {} options.headers ?= {} - options.headers['X-Current-Path'] = document.location.pathname + options.headers['X-Current-Path'] = document.location?.pathname ? 'unknown' success = options.success error = options.error options.success = (model, res) => diff --git a/app/views/play/level/tome/SpellListEntryView.coffee b/app/views/play/level/tome/SpellListEntryView.coffee index 0a9fa82bb..d2d39edb1 100644 --- a/app/views/play/level/tome/SpellListEntryView.coffee +++ b/app/views/play/level/tome/SpellListEntryView.coffee @@ -103,7 +103,7 @@ module.exports = class SpellListEntryView extends CocoView return if @thangsView spellThang = @getPrimarySpellThang() return unless spellThang - @thangsView = new SpellListEntryThangsView thangs: (spellThang.thang for thangID, spellThang of @spell.thangs), thang: spellTHang.thang, spell: @spell, supermodel: @supermodel + @thangsView = new SpellListEntryThangsView thangs: (spellThang.thang for thangID, spellThang of @spell.thangs), thang: spellThang.thang, spell: @spell, supermodel: @supermodel @thangsView.render() @$el.append @thangsView.el @thangsView.$el.mouseenter (e) => @onMouseEnterAvatar()