Upon the consolidation of two or more cities, or the annexation of any city, the consolidated or annexing city shall receive all state funds to which the component cities would have been entitled to receive during the year when such consolidation or annexation became effective.