mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -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
|
// Manually get payload as fallback
|
||||||
if ( payload === undefined ) {
|
if ( payload === undefined ) {
|
||||||
const { promises: fs } = await import('fs')
|
|
||||||
|
|
||||||
// Read back the JSON we just wrote to ensure it exists
|
// Read back the JSON we just wrote to ensure it exists
|
||||||
const savedListJSON = await fs.readFile('./static/nuxt-endpoints.json', 'utf-8')
|
const { default: savedList } = await import('~/static/nuxt-endpoints.json')
|
||||||
const savedList = JSON.parse( savedListJSON )
|
|
||||||
|
|
||||||
const endpoint = savedList.find( resource => {
|
const endpoint = savedList.find( resource => {
|
||||||
return resource.route === route.path
|
return resource.route === route.path
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue