Skip to content

Commit 83639fa

Browse files
committed
upgrade amigo-js version
1 parent cae7d5a commit 83639fa

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

lib/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import Deps from "./types/DepsType";
55
import InitializationConfig from "./types/InitializationConfig";
66
import { writeToConsole } from "./helpers/logger";
77
import MemoizedFunction from "./types/MemoizedFunction";
8+
import { isClient } from "amigo-js";
89

910
let functionCacheStore: InstanceType<typeof FunctionCacheStore>;
1011
let depsCacheStore: InstanceType<typeof DepsCacheStore>;
@@ -20,7 +21,7 @@ const initMemofy = async ({
2021
depsCacheStore = new DepsCacheStore();
2122
hasCachedResultLog = hasLogs;
2223

23-
if (trace && typeof window !== "undefined") {
24+
if (trace && isClient()) {
2425
window.__memofy__ = {
2526
functions: functionCacheStore.store,
2627
dependencies: depsCacheStore.store,

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "memofy",
3-
"version": "1.0.7",
3+
"version": "1.0.8",
44
"description": "Prevents re-execution of large javascript functions that have been processed once with the same parameter.",
55
"main": "build/index.js",
66
"types": "build/index.d.ts",
@@ -56,6 +56,6 @@
5656
"tslib": "^2.7.0"
5757
},
5858
"peerDependencies": {
59-
"amigo-js": "^3.0.0"
59+
"amigo-js": "^3.1.1"
6060
}
6161
}

0 commit comments

Comments
 (0)