Skip to content

Commit

Permalink
fix issue with testing LeafletJS on NodeJS
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielJDufour committed Jan 16, 2024
1 parent 670bcd8 commit 6229e9e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion test/fix-leaflet.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
import "global-jsdom/register";

global.navigator.platform = "MacIntel";
if (!global.navigator.platform) {
try {
global.navigator.platform = "MacIntel";
} catch (error) {
Object.defineProperty(global.navigator, "platform", {
get() {
return "MacIntel";
}
});
}
}

0 comments on commit 6229e9e

Please sign in to comment.