I am using the LoadBytes function from P5.JS which returns an object but I am unable to access "object" via using ".bytes" or "['bytes']".
For some reason when running a live server it seems to work perfectly.
function get_rom () {
    var fileList = document.getElementById("rom").files;
    var fileReader = new FileReader();
    
    if (fileReader && fileList && fileList.length) {
        url = URL.createObjectURL(fileList[0])
        return loadBytes(url)
    }
}
function loadarom () {
    object = get_rom()
    
    print(object.bytes[1]) // <-- issue here
}
 
     
     
    