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

Commit

Permalink
Don't store html as jquery on template model.
Browse files Browse the repository at this point in the history
This is causing race conditions in Chrome 37, and is not really
required for any part of the application
  • Loading branch information
joostverdoorn committed Oct 8, 2014
1 parent 23af80c commit c3a2ad9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions src/mixins/storage.coffee
Expand Up @@ -30,10 +30,6 @@ Tails.Mixins.Storage =
return localStorage

toJSON: ( obj ) ->
if obj.has?("$el")
obj.get("$el").toJSON = () ->
@clone().wrap('<div/>').parent().html()

JSON.stringify obj

indexRoot: ( ) ->
Expand Down
4 changes: 2 additions & 2 deletions src/template.coffee
Expand Up @@ -10,9 +10,9 @@ class Tails.Template extends Tails.Model
# Binds an object to the template using rivets.js.
bind: ( view ) ->
return @fetch(parse: true).then ( ) =>
$el = $(@get('$el')).clone()
$el = $(@get('html')).clone()
rivets.bind $el, view
return $el

parse: ( response, options ) ->
return $el: $(response)
return html: response

0 comments on commit c3a2ad9

Please sign in to comment.