Skip to content

Commit

Permalink
fix(pwa2): fix default slot warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Mar 5, 2022
1 parent 02fef19 commit d6d1071
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/pwa2/src/client/global-components/SWUpdatePopup.ts
Expand Up @@ -20,7 +20,7 @@ export default defineComponent({
const reload = (): void => {
if (registration.value) {
useSkipWaiting(registration.value);
location.reload();
window.location.reload();

registration.value = null;
}
Expand All @@ -40,16 +40,16 @@ export default defineComponent({
h(
Transition,
{ name: "popup" },
slots.default?.({
enabled: enabled.value,
reload,
}) ||
() =>
slots.default?.({
enabled: enabled.value,
reload,
}) ||
(enabled.value
? h(
"div",
"button",
{
class: "sw-update-popup",
role: "button",
tabindex: 0,
onClick: () => reload(),
},
Expand All @@ -58,7 +58,7 @@ export default defineComponent({
h("span", { class: "update" }, h(UpdateIcon)),
]
)
: "")
: null)
);
},
});
1 change: 1 addition & 0 deletions packages/pwa2/src/client/styles/popup.scss
Expand Up @@ -28,6 +28,7 @@
right: 1rem;
bottom: 1rem;
padding: 0.5rem 0.75rem;
border-width: 0;
border-radius: 0.5rem;
box-shadow: 0 2px 12px 0 var(--card-shadow);
background: var(--c-bg, #fff);
Expand Down

0 comments on commit d6d1071

Please sign in to comment.