Skip to content

Commit aa4de7f

Browse files
committed
Wrap source string in brackets
1 parent 3333411 commit aa4de7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/webgl/ShaderGenerator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function shadergenerator(p5, fn) {
1919
if (shaderModifier instanceof Function) {
2020
let generatorFunction;
2121
if (options.parser) {
22-
const sourceString = shaderModifier.toString()
22+
const sourceString = `(${shaderModifier.toString()})`;
2323
const ast = parse(sourceString, {
2424
ecmaVersion: 2021,
2525
locations: options.srcLocations

0 commit comments

Comments
 (0)