Fix the condition to keep original logic
Fix the condition to keep original logic

Address this PR comment: https://github.com/servo/servo/pull/24489/files#diff-30a18e04d7e0b66aafdf192e416cad44R1472
This commit was failed to add in PR #24489.

Issue: #22782

saneyuki/servo,saneyuki/servo,DominoTree/servo,saneyuki/servo,KiChjang/servo,KiChjang/servo,splav/servo,saneyuki/servo,DominoTree/servo,splav/servo,KiChjang/servo,saneyuki/servo,splav/servo,DominoTree/servo,KiChjang/servo,DominoTree/servo,DominoTree/servo,KiChjang/servo,DominoTree/servo,saneyuki/servo,splav/servo,KiChjang/servo,KiChjang/servo,DominoTree/servo,KiChjang/servo,DominoTree/servo,saneyuki/servo,splav/servo,splav/servo,splav/servo,saneyuki/servo,splav/servo,splav/servo,DominoTree/servo,KiChjang/servo,splav/servo,saneyuki/servo,saneyuki/servo,KiChjang/servo,DominoTree/servo