Local Community

SiteData.updateSite method not saving custom data

Hello, trying to save custom data object on the site Json object. Looked at boilerplate and Note add-on code and can replicate and save to both the “notes” and “count” properties but if i try to save to a custom property like “mydata” for example it fails. I can even save the my data object to both the “notes” or “count” properties but not to a new one.

for example this works:

	ipcMain.on('save-count', (event, siteId, otherData) => {
		LocalMain.SiteData.updateSite(siteId, {
			id: siteId,
			otherData,
		});
	});

this does NOT work:

	ipcMain.on('save-mydata', (event, siteId, otherData) => {
		LocalMain.SiteData.updateSite(siteId, {
			id: siteId,
			otherData,
		});
	});

Are the site Json properties locked? can i add to the site Json data structure? how?

thanks!!

Is there an error you are seeing? Maybe within the Typescript compilation?