Skip to content

Commit

Permalink
upgrade Colorjs.io to 0.6.0-alpha.1 (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
bartveneman authored Jan 8, 2025
1 parent 04a7497 commit 924263a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ColorSpace.register(OKLCH)
*/

/**
* @param {string | number | {raw: string} | undefined} value
* @param {string | number | {raw: string} | undefined | null} value
* @returns {number}
* @todo Make this faster based on usage heuristics
*/
Expand All @@ -36,7 +36,7 @@ function numerify(value) {
if (Number.isNaN(value)) {
return 0
}
if (typeof value === 'object' && 'raw' in value) {
if (typeof value === 'object' && value !== null && 'raw' in value) {
return parseFloat(value.raw)
}
return 0
Expand Down
20 changes: 12 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"url": "https://github.com/projectwallace/color-sorter/issues"
},
"dependencies": {
"colorjs.io": "^0.5.2"
"colorjs.io": "^0.6.0-alpha.1"
},
"devDependencies": {
"@codecov/vite-plugin": "^1.7.0",
Expand Down

0 comments on commit 924263a

Please sign in to comment.