Skip to content

Commit

Permalink
Frame transition fix (#886)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjagielka authored Jul 1, 2023
1 parent 079ca87 commit 62ea2d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/lib/utils/Frame.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
import type { TransitionConfig } from 'svelte/transition';
import type { HTMLAnchorAttributes } from 'svelte/elements';
const noop = () => ({});
const null_transition = () => ({ duration: 0 });
const noop = () => {};
type TransitionFunc = (node: HTMLElement, params: any) => TransitionConfig;
type FrameColor = keyof typeof bgColors;
Expand Down Expand Up @@ -35,7 +36,7 @@
export let shadow: boolean = false;
// Export a prop through which you can set a desired svelte transition
export let transition: TransitionFunc = noop;
export let transition: TransitionFunc = null_transition;
// Pass in extra transition params
export let params: object = {};
Expand Down
2 changes: 1 addition & 1 deletion src/lib/utils/Popper.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
};
});
function optional(pred: boolean, func: (ev: Event) => void) {
return (pred && func) || null;
return pred ? func : () => undefined;
}
let position: string = 'bottom';
Expand Down

2 comments on commit 62ea2d4

@vercel
Copy link

@vercel vercel bot commented on 62ea2d4 Jul 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 62ea2d4 Jul 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.