Skip to content

Commit

Permalink
fixed update bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Crenshinibon committed Oct 11, 2013
1 parent 49b1bf5 commit 4ea16c8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .meteor/release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.6.5.1
0.6.6
5 changes: 2 additions & 3 deletions packages/spomet/server.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,8 @@ Meteor.methods
Spomet.remove findable.docId
else if findable?
Spomet.remove findable
spometUpdate: (findale) ->
prevDocId = findable.previousVersionDocId()
Spomet.remove prevDocId
spometUpdate: (findable) ->
Spomet.remove findable.previousVersionDocId
Spomet.add findable

Meteor.publish 'documents', () ->
Expand Down
3 changes: 1 addition & 2 deletions packages/spomet/shared.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ class Spomet.Findable
unless version? then @version = 1
unless type? then @type = 'default'
@docId = @type + '-' + base + '-' + path + '-' + @version
previousVersionDocId: () ->
@type + '-' + @base + '-' + @path + '-' + (@version - 1)
@previousVersionDocId = @type + '-' + base + '-' + path + '-' + (@version - 1)

@Index = {}

0 comments on commit 4ea16c8

Please sign in to comment.