Hash value undefined

Hi everyone,
I am currently developing a simple file-uploader using js-ipfs.
Everything works correctly, I can upload the file to IPFS and access it using the CID.
I have a problem though, probably code-related; the part in which I am having this problem is the following:
const addFile = async (fileName, filePath) => {
const fileContent = fs.readFileSync(filePath);
console.log('fileBuffer: ', fileContent);

const fileAdded = await ipfs.add({ path: fileName, content: fileContent });
console.log('Your file on IPFS: ', fileAdded);

const fileHash = fileAdded.cid;
console.log('Your hash on IPFS: ', fileHash);

return fileHash;

Basically, with console.log of fileAdded I can see the details of the upload file (including the CID) as:
Your file on IPFS: [
path: ‘Test’,
hash: ‘Qmxxxxx’,
size: 107024
but when I specifically try to print the cid value using fileAdded.cid or fileAdded.hash, the hash value is undefined.
Does anybody know why?
Thank you all:slight_smile: