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

Commit a075824

Browse files
deplaywesleycho
authored andcommitted
feat(stackedMap): improve perf of removeTop
- Change `removeTop` from `slice` to `pop` Closes #5925 Closes #5932
1 parent 13c14af commit a075824

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/stackedMap/stackedMap.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ angular.module('ui.bootstrap.stackedMap', [])
4343
return stack.splice(idx, 1)[0];
4444
},
4545
removeTop: function() {
46-
return stack.splice(stack.length - 1, 1)[0];
46+
return stack.pop();
4747
},
4848
length: function() {
4949
return stack.length;

0 commit comments

Comments
 (0)