Skip to content

Commit

Permalink
Fix bundle export error (Leaflet#8050)
Browse files Browse the repository at this point in the history
  • Loading branch information
Falke-Design authored Mar 11, 2022
1 parent 4118c9b commit 7c565e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions build/rollup-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ const version = release ? pkg.version : `${pkg.version}+${gitRev.branch()}.${git
const banner = createBanner(version);

const outro = `var oldL = window.L;
leaflet.noConflict = function() {
exports.noConflict = function() {
window.L = oldL;
return this;
}
// Always export us to window global (see #2364)
window.L = leaflet;`;
window.L = exports;`;

/** @type {import('rollup').RollupOptions} */
const config = {
Expand Down
4 changes: 2 additions & 2 deletions spec/karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
var json = require('@rollup/plugin-json');

const outro = `var oldL = window.L;
leaflet.noConflict = function() {
exports.noConflict = function() {
window.L = oldL;
return this;
}
// Always export us to window global (see #2364)
window.L = leaflet;`;
window.L = exports;`;

// Karma configuration
module.exports = function (config) {
Expand Down

0 comments on commit 7c565e5

Please sign in to comment.