Skip to content

Commit 91dacd4

Browse files
committed
v14.2.14
1 parent 1f9c92d commit 91dacd4

5 files changed

Lines changed: 5 additions & 20 deletions

File tree

build/cjs/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/esm/index.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

published/14.2.14/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

published/latest/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.js

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,3 @@
11
import Gleap from "./Gleap";
22

3-
// Create a dummy no-op proxy for server environments.
4-
const dummyFn = () => {};
5-
const dummyHandler = {
6-
// Any property access will return a function that does nothing.
7-
get: () => dummyFn,
8-
// If the dummy is ever called as a function, return a no-op.
9-
apply: () => dummyFn(),
10-
// If someone tries to use "new" on it, return an empty object.
11-
construct: () => ({}),
12-
};
13-
14-
const dummyGleap = new Proxy(dummyFn, dummyHandler);
15-
16-
// Export the real Gleap if window exists (i.e. in the browser),
17-
// otherwise export the dummy version.
18-
export default typeof window !== "undefined" ? Gleap : dummyGleap;
3+
export default Gleap;

0 commit comments

Comments
 (0)