mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-15 06:35:20 -07:00
Fix fs import errod
This commit is contained in:
parent
9e26670d63
commit
bc7a5de462
1 changed files with 1 additions and 4 deletions
|
|
@ -122,11 +122,8 @@ export default {
|
|||
|
||||
// Manually get payload as fallback
|
||||
if ( payload === undefined ) {
|
||||
const { promises: fs } = await import('fs')
|
||||
|
||||
// Read back the JSON we just wrote to ensure it exists
|
||||
const savedListJSON = await fs.readFile('./static/nuxt-endpoints.json', 'utf-8')
|
||||
const savedList = JSON.parse( savedListJSON )
|
||||
const { default: savedList } = await import('~/static/nuxt-endpoints.json')
|
||||
|
||||
const endpoint = savedList.find( resource => {
|
||||
return resource.route === route.path
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue