From b157d8b4786e9435483368ae45cef2626d3ae9d0 Mon Sep 17 00:00:00 2001 From: Thomas den Hollander Date: Wed, 24 Oct 2018 13:08:08 +0200 Subject: [PATCH] Change splice to pop in annotation tests This line in the annotation tests subtracts an array from a number. This is because `splice(-1, 1)` returns a one-element array, while `pop()` returns only the element itself. --- test/unit/annotation_spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/annotation_spec.js b/test/unit/annotation_spec.js index 49c9b7c3a..7c83ce53a 100644 --- a/test/unit/annotation_spec.js +++ b/test/unit/annotation_spec.js @@ -975,7 +975,7 @@ describe('annotation', function() { // Remove the last invalid flag for the next iteration. if (!valid) { - flags -= invalidFieldFlags.splice(-1, 1); + flags -= invalidFieldFlags.pop(); } }); });