Skip to content

Commit

Permalink
Fix 0 not falling back to 32
Browse files Browse the repository at this point in the history
  • Loading branch information
N1ck committed Jan 12, 2024
1 parent d1b764e commit 2a73669
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ function addToolbarButton() {
const trigger = select('.ghg-trigger', form)
// Calculate the width of the GIF button, so that we can adjust the toolbar min size to accommodate for it.
// Also add 8 px buffer
const triggerWidth = (trigger?.offsetWidth ?? 32) + 8
const triggerWidth = (trigger?.offsetWidth || 32) + 8

if (currentWidth.includes('px')) {
// Extracts the value from the string (e.g., 640 from "min(640px, 100vw - 2rem)")
Expand Down

0 comments on commit 2a73669

Please sign in to comment.