Skip to content

Commit

Permalink
fix: review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
maijalintunokka committed Oct 10, 2024
1 parent c2e9787 commit a4feab9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { initNostoStub } from "./utils/dom"

export * from "./lib/getNostoWindow"
export * from "./lib/helpers"
export * from "./lib/init"
export * from "./lib/nostojs"
Expand Down
10 changes: 0 additions & 10 deletions src/lib/getNostoWindow.ts

This file was deleted.

12 changes: 12 additions & 0 deletions src/lib/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
import { Settings } from "../client/nosto"

export function isNostoLoaded() {
return typeof window.nosto !== "undefined"
}

export function reloadNostoWindow(settings: Partial<Settings>) {
if (window.nosto) {
window.nosto.reload(settings)
}
}

export function getNostoWindow() {
return window.nosto
}
1 change: 0 additions & 1 deletion src/testing/mockNostojs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export function restoreNostojs() {

export function clearNostoGlobals() {
Object.assign(window, {
...window,
// clearing Nosto iframe window handle
nosto: undefined,
// clearing nostojs stub
Expand Down

0 comments on commit a4feab9

Please sign in to comment.