Skip to content

Commit ccd608d

Browse files
committed
added Angular support
1 parent 9040587 commit ccd608d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

proj4-fully-loaded.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
const proj4 = require("proj4");
1+
let proj4 = require("proj4");
22
const defs = require("proj4js-definitions");
33

4+
if (typeof proj4 === "object" && typeof proj4.defs !== "function" && typeof proj4.default === "function") {
5+
// probably inside an Angular project
6+
proj4 = proj4.default;
7+
}
8+
49
proj4.defs(defs);
510

611
module.exports = proj4;

0 commit comments

Comments
 (0)