make sure we have an array for the resourceMapId before trying to add to
it - my local host had this state and it resulted in a JS error. Other
indexes might have similar values and we might as well protect against
it.