fix a few more bugs

This commit is contained in:
Triston Armstrong 2024-01-07 12:17:57 -06:00
parent 6ccbb6537e
commit c3dd11e7e2
3 changed files with 4 additions and 5 deletions

BIN
bun.lockb

Binary file not shown.

View File

@ -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

View File

@ -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",