Add a function of array compensation for localStorage