Skip to content

Commit 58892a5

Browse files
committed
fix: type error
1 parent 31a90ee commit 58892a5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/shader-lab/src/ShaderLabUtils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class ShaderLabUtils {
2727
source: string,
2828
location: ShaderRange | ShaderPosition,
2929
file?: string
30-
): Error | void {
30+
): Error | undefined {
3131
// #if _VERBOSE
3232
return new GSError(errorName, message, location, source, file);
3333
// #else

packages/shader-lab/src/common/BaseScanner.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export default class BaseScanner {
148148
throwError(pos: ShaderPosition | ShaderRange, ...msgs: any[]) {
149149
const error = ShaderLabUtils.createGSError(msgs.join(" "), GSErrorName.ScannerError, this._source, pos);
150150
// #if _VERBOSE
151-
Logger.error(error.toString());
151+
Logger.error(error!.toString());
152152
// #endif
153153
throw error;
154154
}

0 commit comments

Comments
 (0)