trigger solid layer on large projections. add flat call stack limit fallback method

This commit is contained in:
Stewart Allen 2022-02-27 15:00:59 -05:00
commit 67bdbf9125
3 changed files with 28 additions and 1 deletions

View file

@ -9,7 +9,16 @@ let AP = {};
if (!AP.flat) {
AP.flat = function() {
return [].concat.apply([], this);
try {
return [].concat.apply([], this);
} catch (e) {
// console.log({flat_error: e});
let out = [];
for (let e of this.slice()) {
out.push(...e);
}
return out;
}
};
}