From d645064a6d3484998b8b1f5bfb12e431da0fa4d6 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Mon, 20 Jan 2014 19:50:12 +0000 Subject: [PATCH] 'in' doesn't do what i thought it did for arrays - doh! --- plugins/regions.user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/regions.user.js b/plugins/regions.user.js index e2bddc78..73341d52 100644 --- a/plugins/regions.user.js +++ b/plugins/regions.user.js @@ -74,7 +74,7 @@ window.plugin.regions.regionName = function(cell) { // ingress does some odd things with the naming. for some faces, the i and j coords are flipped when converting // (and not only the names - but the full quad coords too!). easiest fix is to create a temporary cell with the coords // swapped - if (cell.face in [1, 3, 5]) { + if (cell.face == 1 || cell.face == 3 || cell.face == 5) { cell = S2.S2Cell.FromFaceIJ ( cell.face, [cell.ij[1], cell.ij[0]], cell.level ); }