Skip to content
This repository has been archived by the owner on Sep 8, 2024. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sheepbox8646 committed Aug 12, 2024
1 parent 0a73b58 commit c5debc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/json/src/import-widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ export function processColor(color: string | Array<number>) {
if (Array.isArray(color)) {
return Color.rgba(color[0], color[1], color[2], color[3] ?? 1)
}
else if (isString(color) && /color\(.+\)/) {
else if (isString(color) && /color\(.+\)/.test(color)) {
return Color.parse(color.replace(/color\(/, '').replace(/\)$/, ''))
}
else if (isString(color) && /shader\(.+\)/) {
else if (isString(color) && /shader\(.+\)/.test(color)) {
return Shader.createColorShader(Color.WHITE)
}
else {
Expand Down

0 comments on commit c5debc8

Please sign in to comment.