funcion/refactor-general #45

Merged
atasistro merged 240 commits from funcion/refactor-general into master 2025-06-19 21:10:19 -03:00
Showing only changes of commit deaa65d857 - Show all commits

View file

@ -1,5 +1,3 @@
import { dropWhile } from "lodash/array";
const state = {
show_chismosa: false,
show_devoluciones: false,
@ -24,6 +22,14 @@ const mutations = {
const actions = {
clickMiga({ dispatch }, { miga }) {
let dropWhile = (array, pred) => {
let result = array.slice(0);
while (result.length && pred(result[0])) {
result = result.slice(1)
}
return result;
}
dispatch(miga.action, miga.arguments ?? null, { root: true });
state.migas = dropWhile(state.migas.reverse(),(m => m.nombre !== miga.nombre)).reverse();
},