Fix broken promise
This commit is contained in:
parent
e265d0d16e
commit
6f2a2a5a9e
|
@ -3,7 +3,7 @@ import data from './data.json'
|
|||
|
||||
export function getData (path = '') {
|
||||
if (path === '') {
|
||||
return data
|
||||
return Promise.resolve(data)
|
||||
} else {
|
||||
const fileName = '../../content/' + path
|
||||
return readFile(fileName)
|
||||
|
|
Loading…
Reference in New Issue