Skip to content

Conversation

@cubicj
Copy link
Contributor

@cubicj cubicj commented Oct 23, 2025

PR Checklist

  • Have you checked if it works normally in all models? Ignore this if it doesn't use models.
  • Have you checked if it works normally in all web, local, and node hosted versions? If it doesn't, have you blocked it in those versions?
  • Have you added type definitions?

Description

Overview

Fixed a variable mismatch bug in the prebuilt asset exclude toggle functionality that prevented assets from being re-included after exclusion.

Problem

In CharConfig.svelte, the asset exclude toggle button used inconsistent variable references:

  • Used assetFilePath[i] (temporary blob URL) for CSS class condition and removal filter
  • Used assets[1] (permanent asset ID) for adding to exclude array and icon display

Since assetFilePath[i] and assets[1] contain different values, the filter operation never matched any items, preventing excluded assets from being re-included.

Solution

Changed lines 640 and 643 to consistently use assets[1] (the permanent asset ID) across all operations:

  • CSS class condition
  • Removal filter
  • Add operation
  • Icon display condition

Changes

  • Line 640: Changed CSS class condition from assetFilePath[i] to assets[1]
  • Line 643: Changed filter comparison from assetFilePath[i] to assets[1]

Testing

The toggle button now works correctly:

  • Clicking on included asset adds it to exclude list
  • Clicking on excluded asset removes it from exclude list and restores inclusion

Fixed variable mismatch bug where assetFilePath was used instead of assets[1] in exclude toggle logic, preventing assets from being re-included after exclusion.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant