From f5cf5d9238c07358f72909a4755c0d2332caecf1 Mon Sep 17 00:00:00 2001 From: Stewart Allen Date: Thu, 27 Oct 2022 11:05:59 -0400 Subject: [PATCH] fix override of array.find --- src/add/array.js | 2 +- src/kiri-mode/cam/client.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/add/array.js b/src/add/array.js index 246eeb99..c0f4f775 100644 --- a/src/add/array.js +++ b/src/add/array.js @@ -22,7 +22,7 @@ if (!AP.flat) { }; } -AP.find = function(fn) { +AP.findWith = function(fn) { for (let i=0, l=this.length; i rec.type === 'flip'); + let fpos = oplist.findWith(rec => rec.type === 'flip'); if (fpos >= 0 && oplist.length > 1) { let oprec = oplist.splice(fpos,1); oplist.push(oprec[0]);