Skip to content
This repository has been archived by the owner on Jul 28, 2018. It is now read-only.

Commit

Permalink
Use function for comparison instead of function name
Browse files Browse the repository at this point in the history
  • Loading branch information
reed committed Feb 14, 2014
1 parent 2405f8c commit c5cda21
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/assets/javascripts/turbolinks.js.coffee
Expand Up @@ -235,14 +235,14 @@ browserCompatibleDocumentParser = ->
return createDocumentUsingWrite


# The ComponenetUrl class converts a basic URL string into an object
# The ComponentUrl class converts a basic URL string into an object
# that behaves similarly to document.location.
#
# If an instance is created from a relative URL, the current document
# is used to fill in the missing attributes (protocol, host, port).
class ComponentUrl
constructor: (@original = document.location.href) ->
return @original if @original.constructor.name is @constructor.name
return @original if @original.constructor is ComponentUrl
@_parse()

withoutHash: -> @href.replace @hash, ''
Expand Down Expand Up @@ -271,7 +271,7 @@ class Link extends ComponentUrl
Link.HTML_EXTENSIONS

constructor: (@link) ->
return @link if @link.constructor.name is @constructor.name
return @link if @link.constructor is Link
@original = @link.href
super

Expand Down

0 comments on commit c5cda21

Please sign in to comment.