lib/assets/javascripts/wiselinks.js.coffee in wiselinks-0.6.3 vs lib/assets/javascripts/wiselinks.js.coffee in wiselinks-0.6.4

- old
+ new

@@ -7,15 +7,15 @@ class Wiselinks constructor: ($target = $('body'), @options = {}) -> this._try_jquery() @options = $.extend(this._defaults(), @options) - if this.enabled() + if this.enabled() @page = new _Wiselinks.Page($target, @options) enabled: -> - !History.emulated.pushState || @options.html4 == true + !History.emulated.pushState || @options.html4 == true load: (url, target, render = 'template') -> @page.load(url, target, render) reload: () -> @@ -24,11 +24,11 @@ _defaults: -> html4: true html4_root_path: '/' html4_normalize_path: true target_missing: null - assets_digest: $("meta[name='assets-digest']").attr("content") + assets_digest: $("meta[name='assets-digest']").attr("content") _try_jquery: -> - throw "[Wiselinks] jQuery is not loaded" unless window.jQuery? + throw new Error("[Wiselinks] jQuery is not loaded") unless window.jQuery? window.Wiselinks = Wiselinks \ No newline at end of file