fix a few more bugs
This commit is contained in:
parent
6ccbb6537e
commit
c3dd11e7e2
@ -6,7 +6,7 @@ import { toString } from 'mdast-util-to-string'
|
||||
import path from 'path'
|
||||
import fs from 'fs'
|
||||
|
||||
import * as dirTree from 'directory-tree'
|
||||
const dirTree = require("directory-tree");
|
||||
|
||||
class Util {
|
||||
_counter
|
||||
@ -229,12 +229,12 @@ class Util {
|
||||
const children = []
|
||||
const slugs = this.getAllSlugs()
|
||||
|
||||
function findFunc(slug) {
|
||||
const fileName = Transformer.parseFileNameFromPath(this.toFilePath(slug))
|
||||
function findFunc(_this, slug) {
|
||||
const fileName = Transformer.parseFileNameFromPath(_this.toFilePath(slug))
|
||||
return Transformer.normalizeFileName(fileName) === Transformer.normalizeFileName(thisObject.name)
|
||||
}
|
||||
|
||||
const foundSlugs = slugs.find(slug => findFunc(slug))
|
||||
const foundSlugs = slugs.find(slug => findFunc(this, slug))
|
||||
|
||||
let routerPath = foundSlugs !== (null | undefined) ? foundSlugs : null
|
||||
|
||||
|
@ -65,7 +65,6 @@
|
||||
"cytoscape": "latest",
|
||||
"eslint": "^8.0.1",
|
||||
"eslint-config-next": "latest",
|
||||
"postcss": "^8.4.32",
|
||||
"remark-frontmatter": "latest",
|
||||
"remark-react": "latest",
|
||||
"remark-stringify": "latest",
|
||||
|
Loading…
Reference in New Issue
Block a user