Skip to content

Commit

Permalink
Fix type error
Browse files Browse the repository at this point in the history
  • Loading branch information
timneutkens committed May 2, 2023
1 parent d24e995 commit 47f2f75
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ export class TraceEntryPointsPlugin implements webpack.WebpackPluginInstance {
public turbotraceContext: TurbotraceContext = {}

private rootDir: string
private appDir: string
private pagesDir: string
private appDir: string | undefined
private pagesDir: string | undefined
private appDirEnabled?: boolean
private tracingRoot: string
private entryTraces: Map<string, Set<string>>
Expand All @@ -150,8 +150,8 @@ export class TraceEntryPointsPlugin implements webpack.WebpackPluginInstance {
turbotrace,
}: {
rootDir: string
appDir: string
pagesDir: string
appDir: string | undefined
pagesDir: string | undefined
appDirEnabled?: boolean
traceIgnores?: string[]
outputFileTracingRoot?: string
Expand Down Expand Up @@ -362,8 +362,9 @@ export class TraceEntryPointsPlugin implements webpack.WebpackPluginInstance {

// Ensures we don't handle non-pages.
if (
absolutePath.startsWith(this.pagesDir) ||
absolutePath.startsWith(this.appDir)
(this.pagesDir &&
absolutePath.startsWith(this.pagesDir)) ||
(this.appDir && absolutePath.startsWith(this.appDir))
) {
entryModMap.set(absolutePath, entryMod)
entryNameMap.set(absolutePath, name)
Expand Down

0 comments on commit 47f2f75

Please sign in to comment.