Skip to content

Commit

Permalink
BUGFIX setup-skia-web script not picking up the custom folder param…
Browse files Browse the repository at this point in the history
…eter (#2411)

After doing more testing with the `setup-skia-web` script, I realized that it wasn't picking up the custom folder parameter.
=> Just needed some parenthesis on the ternary condition to apply the proper value. 😬🤦🏼‍♂️

Use case: `yarn public/my/custom/path` should copy to the location specified in the first parameter.
  • Loading branch information
kimchouard committed May 7, 2024
1 parent 16a913e commit 8a1559d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package/scripts/setup-canvaskit.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function getWasmFilePath() {

function getOutputFilePath(isAnExpoProjectWithMetro) {
// Default to using `web` public path.
const publicFolder = path.resolve(args[0] || (isAnExpoProjectWithMetro) ? "public" : "web/static/js");
const publicFolder = path.resolve(args[0] || ((isAnExpoProjectWithMetro) ? "public" : "web/static/js"));
const publicLocation = "./canvaskit.wasm";
const output = path.join(publicFolder, publicLocation);

Expand Down

0 comments on commit 8a1559d

Please sign in to comment.