Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Commit

Permalink
feat(stackedMap): improve perf of removeTop
Browse files Browse the repository at this point in the history
- Change `removeTop` from `slice` to `pop`

Closes #5925
Closes #5932
  • Loading branch information
deplay authored and wesleycho committed May 28, 2016
1 parent 13c14af commit a075824
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/stackedMap/stackedMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ angular.module('ui.bootstrap.stackedMap', [])
return stack.splice(idx, 1)[0];
},
removeTop: function() {
return stack.splice(stack.length - 1, 1)[0];
return stack.pop();
},
length: function() {
return stack.length;
Expand Down

0 comments on commit a075824

Please sign in to comment.