Maybe I am wrong but if at the beginning of this function we check if (!queueFromStorage) { return; }, this condition wouldn't be necessary, isn't?