Skip to content

Commit 111a732

Browse files
authored
Merge pull request #257 from litecanvas/fix
Fix pal(). Thanks @menn at discord
2 parents b8f8c57 + 0e526db commit 111a732

File tree

4 files changed

+25
-27
lines changed

4 files changed

+25
-27
lines changed

bun.lock

Lines changed: 19 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "litecanvas",
3-
"version": "0.102.1",
3+
"version": "0.102.2",
44
"description": "Lightweight HTML5 canvas 2D game engine suitable for small projects and creative coding. Inspired by PICO-8 and p5.js/Processing.",
55
"license": "MIT",
66
"author": "Luiz Bills <luizbills@pm.me>",
@@ -33,13 +33,13 @@
3333
"devDependencies": {
3434
"@happy-dom/global-registrator": "^18.0.1",
3535
"@size-limit/preset-small-lib": "^11.2.0",
36-
"@swc/core": "^1.15.2",
36+
"@swc/core": "^1.15.8",
3737
"ava": "^6.4.1",
3838
"esbuild": "^0.25.12",
3939
"genversion": "^3.2.0",
4040
"gzip-size": "^7.0.0",
41-
"prettier": "^3.6.2",
42-
"sinon": "^21.0.0",
41+
"prettier": "^3.7.4",
42+
"sinon": "^21.0.1",
4343
"size-limit": "^11.2.0",
4444
"tap-min": "^3.0.0"
4545
},

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1119,7 +1119,7 @@ export default function litecanvas(settings = {}) {
11191119
*/
11201120
pal(colors, textColor = 3) {
11211121
DEV: assert(
1122-
Array.isArray(colors) && colors.length > 0,
1122+
null == colors || (Array.isArray(colors) && colors.length > 0),
11231123
'[litecanvas] pal() 1st param must be a array of color strings'
11241124
)
11251125
DEV: assert(

src/version.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)