[ts][canvaskit] Removed additional slash from texture url.

This commit is contained in:
Davide Tantillo 2024-11-13 11:04:39 +01:00
parent 814f0ae8fd
commit a4ea2979cd

View File

@ -132,7 +132,7 @@ export async function loadTextureAtlas (
const atlas = new TextureAtlas(bufferToUtf8String(await readFile(atlasFile)));
const slashIndex = atlasFile.lastIndexOf("/");
const parentDir =
slashIndex >= 0 ? atlasFile.substring(0, slashIndex + 1) + "/" : "";
slashIndex >= 0 ? atlasFile.substring(0, slashIndex + 1) : "";
for (const page of atlas.pages) {
const texture = await CanvasKitTexture.fromFile(
ck,