Skip to content

Commit

Permalink
v0.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
evankirkiles committed Jun 6, 2023
1 parent 0936cc2 commit b78a15b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "meta-theme-swap",
"version": "0.0.3",
"version": "0.0.4",
"description": "Synchronizes WebKit meta theme color with elements on the page.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/useMetaTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ export default function useMetaTheme(ref: RefObject<Element>, color: string) {
if (!node) return;
node.setAttribute('data-metathemeswap-color', color);
}, [color, ref]);

useEffect(() => {
const node = ref.current;
if (!node || !observerTop) return;
observerTop?.observe(node);
}, [observerTop, ref]);

useEffect(() => {
const node = ref.current;
if (!node || !observerBottom) return;
Expand Down

0 comments on commit b78a15b

Please sign in to comment.