Commit 277b6d1e authored by Ujvari Gergely's avatar Ujvari Gergely

using unshift(<>) instead of splice(0,0,<>)

parent 54900820
...@@ -43,7 +43,7 @@ class Stream ...@@ -43,7 +43,7 @@ class Stream
switch action switch action
when 'create', 'past' when 'create', 'past'
unless annotation in $scope.annotations unless annotation in $scope.annotations
$scope.annotations.splice 0,0,annotation $scope.annotations.unshift annotation
when 'update' when 'update'
index = 0 index = 0
for ann in $scope.annotations for ann in $scope.annotations
...@@ -51,7 +51,7 @@ class Stream ...@@ -51,7 +51,7 @@ class Stream
#Remove the original #Remove the original
$scope.annotations.splice index,1 $scope.annotations.splice index,1
#Put back the edited #Put back the edited
$scope.annotations.splice 0,0,annotation $scope.annotations.unshift annotation
break break
index +=1 index +=1
when 'delete' when 'delete'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment