Skip to content

Commit

Permalink
remove JSON,stringify
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed Apr 28, 2023
1 parent 4d0b267 commit d7661fe
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/hooks/useLink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,16 @@ export const useLink = (options: LinkOptions) => {
(node.current as Element).setAttribute(key, options[key]);
});
}
}, [JSON.stringify(options)]);
}, [
options.href,
options.media,
options.as,
options.rel,
options.crossorigin,
options.type,
options.hreflang,
options.sizes,
]);

useEffect(() => {
hasMounted.current = true;
Expand Down

0 comments on commit d7661fe

Please sign in to comment.