Skip to content

Commit

Permalink
leftover ssr problems
Browse files Browse the repository at this point in the history
  • Loading branch information
CarelessCourage committed Feb 15, 2024
1 parent 2c802c9 commit 0a3c0d6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/dye/composables/canvas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ interface RCP {
}

function resizeObserver(callback: () => void) {
if (!window) return null
if (!('ResizeObserver' in window)) return null
const observer = new ResizeObserver(callback)
return observer
Expand Down
1 change: 1 addition & 0 deletions packages/dye/composables/eyedropper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ function getColor(hex: string) {
}

function notSupported() {
if (!window) return true
if (!('EyeDropper' in window)) {
console.log('EyeDropper API not supported')
return true
Expand Down
2 changes: 1 addition & 1 deletion packages/dye/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@umbrajs/dye",
"private": false,
"version": "0.0.153",
"version": "0.0.154",
"description": "Vue color picker using umbra",
"author": "Samuel M. Bednarz<https://github.com/CarelessCourage>",
"license": "MIT",
Expand Down

0 comments on commit 0a3c0d6

Please sign in to comment.