Fix undefined values appearing in CSS class names#487
Merged
Conversation
Co-authored-by: devoto13 <823594+devoto13@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix class names in DOM from fa-icon to remove undefined
Fix undefined values appearing in CSS class names
Jan 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When optional fa-icon inputs (flip, rotate, pull, size) are undefined, they were generating class names like
fa-undefinedandfa-pull-undefinedin the DOM.Root Cause
The classlist generator used strict null checks (
!== null) which don't filter undefined values:undefined !== null→true(class gets added)undefined != null→false(class filtered out)Changes
classlist.util.ts: Changed
props.size !== nullandprops.pull !== nullto use loose equality (!= null), consistent with existing checks for animation, rotate, and stackItemSize in the same fileclasslist.util.spec.ts: Added unit tests verifying undefined properties don't generate classes containing "undefined"
Before
After
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
accounts.google.com/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=4238 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-77603855 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,1902122227314661081,7727019843955873751,262144 --disable-features=PaintHolding --variations-seed-version --trace-process-track-uuid=3190708989122997041(dns block)/opt/google/chrome/chrome /usr/bin/google-chrome --user-data-dir=/tmp/karma-77603855 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --no-sandbox http://localhost:9876/?id=77603855 --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222(dns block)/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=4408 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-63767769 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,3687498036657464119,170698497816152802,262144 --disable-features=PaintHolding --variations-seed-version --trace-process-track-uuid=3190708989122997041(dns block)clients2.google.com/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=4238 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-77603855 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,1902122227314661081,7727019843955873751,262144 --disable-features=PaintHolding --variations-seed-version --trace-process-track-uuid=3190708989122997041(dns block)/opt/google/chrome/chrome /usr/bin/google-chrome --user-data-dir=/tmp/karma-77603855 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --no-sandbox http://localhost:9876/?id=77603855 --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222(dns block)/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=4408 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-63767769 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,3687498036657464119,170698497816152802,262144 --disable-features=PaintHolding --variations-seed-version --trace-process-track-uuid=3190708989122997041(dns block)clientservices.googleapis.com/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=4238 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-77603855 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,1902122227314661081,7727019843955873751,262144 --disable-features=PaintHolding --variations-seed-version --trace-process-track-uuid=3190708989122997041(dns block)/opt/google/chrome/chrome /usr/bin/google-chrome --user-data-dir=/tmp/karma-77603855 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --no-sandbox http://localhost:9876/?id=77603855 --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222(dns block)/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=4408 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-63767769 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,3687498036657464119,170698497816152802,262144 --disable-features=PaintHolding --variations-seed-version --trace-process-track-uuid=3190708989122997041(dns block)googlechromelabs.github.io/usr/local/bin/node /usr/local/bin/node install.js(dns block)redirector.gvt1.com/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=4238 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-77603855 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,1902122227314661081,7727019843955873751,262144 --disable-features=PaintHolding --variations-seed-version --trace-process-track-uuid=3190708989122997041(dns block)/opt/google/chrome/chrome /usr/bin/google-chrome --user-data-dir=/tmp/karma-77603855 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --no-sandbox http://localhost:9876/?id=77603855 --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222(dns block)/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=4408 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-63767769 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,3687498036657464119,170698497816152802,262144 --disable-features=PaintHolding --variations-seed-version --trace-process-track-uuid=3190708989122997041(dns block)safebrowsingohttpgateway.googleapis.com/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=4238 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-77603855 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,1902122227314661081,7727019843955873751,262144 --disable-features=PaintHolding --variations-seed-version --trace-process-track-uuid=3190708989122997041(dns block)/opt/google/chrome/chrome /usr/bin/google-chrome --user-data-dir=/tmp/karma-77603855 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --no-sandbox http://localhost:9876/?id=77603855 --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222(dns block)/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=4408 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-63767769 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,3687498036657464119,170698497816152802,262144 --disable-features=PaintHolding --variations-seed-version --trace-process-track-uuid=3190708989122997041(dns block)www.google.com/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=4238 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-77603855 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,1902122227314661081,7727019843955873751,262144 --disable-features=PaintHolding --variations-seed-version --trace-process-track-uuid=3190708989122997041(dns block)/opt/google/chrome/chrome /usr/bin/google-chrome --user-data-dir=/tmp/karma-77603855 --enable-automation --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-REDACTED-timer-throttling --disable-renderer-REDACTEDing --disable-device-discovery-notifications --no-sandbox http://localhost:9876/?id=77603855 --headless --disable-gpu --disable-dev-shm-usage --remote-debugging-port=9222(dns block)/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --use-angle=swiftshader-webgl --crashpad-handler-pid=4408 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/karma-63767769 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,3687498036657464119,170698497816152802,262144 --disable-features=PaintHolding --variations-seed-version --trace-process-track-uuid=3190708989122997041(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.