I figured out that I was passing the wrong information to the attributes. I changed it to this and it started working:
attributes: {
mediaID: {
type: 'number',
},
mediaURL: {
type: 'string',
source: 'attribute',
selector: 'a',
attribute: 'href',
},
},