- using handsontable in nextjs app
- the table is working and loads the data on first render
- when I reload the page I get the error:
ReferenceError: navigator is not defined
at setBrowserMeta (file:///Users/…/node_modules/handsontable/helpers/browser.mjs:68:45)
at file:///Users/…/node_modules/handsontable/helpers/browser.mjs:90:1
at ModuleJob.run (node:internal/modules/esm/module_job:193:25) {
page: ‘/auth/business-rules’
I’m not sure what to do here - any help would be greatly appreciated!
Code below:
// a save button outside the table triggers this patch request
const handleSave = async (data:any) => {
try {
const response = await axios.patch(’/api/business-rules’, data);
// then reloads the page to refresh data from db
router.reload()
return response.data;
} catch (error) {
console.error(error);
return error;
}
};