if(!metaData.file_url.includes('https://')) {
craigbersiks opened this issue · comments
Hi,
Thank you for the update! looking great.
I seem to be getting this error now:
if(!metaData.file_url.includes('https://')) {........... TypeError: Cannot read properties of undefined (reading 'includes')
I am not sure what I am doing wrong.
Im having same problem
seems like some of your metadata doesn't have a file_url? Can you provide an example of a json file from the build folder?
Yes its about that i have already checked. Thanks. I built my images and json files with old version of config.js. I updated my config.js with your latest version and I rebuild my NFTs and it fixed. Thanks a lot.
{
"name": "MysteryOrb #1",
"description": "Orb Collection",
"image": "ipfs://NewUriToReplace/1.png",
"dna": "206e32739e05ba470d7d1a3897c44869d1a365ee",
"edition": 1,
"date": 1641313918556,
"attributes": [
{
"trait_type": "Background",
"value": "Marble Lab"
},
{
"trait_type": "Cloud",
"value": "Cloud"
},
{
"trait_type": "Shadow",
"value": "Here's Reddy"
},
{
"trait_type": "Orb",
"value": "Yellow Blue Spotty"
}
],
"compiler": "AfricanMystery"
}
Fixed it, Thank you
I'm having the same issue TypeError: Cannot read properties of undefined (reading 'includes') - checked my config.js and it matches, and my JSON files have the File_url - here is an example "File_url": "ipfs://NewUriToReplace/1.png",
any other suggestions on what to look at?
it's odd that is says reading a property, but shouldn't it be a method? just an observation. when I use intellisense it doesn't show "includes" as an option after File_url.
I have faced the same issue and found that Hashlibs now uses image
instead of file_url
in a function called addMetaData
in main.js
Hi All
I solved this error, which I was getting when applying "includes" to a "!metaData.file_url.includes('https://'" value, by appending ".toString();"
!metaData.file_url.toString().includes("https://")
The .includes() API is part of the String and Array data type.
So what the error is trying to tell you is that the value for variable value, e.g. an integer or json object, does not have the property .includes.