Skip to content

Commit

Permalink
Remove all polyfill.io
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Jun 27, 2024
1 parent c1a73b1 commit 81e11ee
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
4 changes: 0 additions & 4 deletions api/dist/apihelp/apihelp.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ <h1>Simple API Help</h1>
<h2>Basis</h2>
<p>To use the API you should add the following HTML:</p>
<pre><code data-language="html">
&lt;script
src="https://cdn.polyfill.io/v2/polyfill.min.js?features=es6,default-3.6,Array.prototype.includes,Object.entries,Object.values"
crossorigin="anonymous"&gt;
&lt;/script&gt;
&lt;link href="https://geomapfish-demo-2-8.camptocamp.com/api.css" rel="stylesheet"&gt;
&lt;script src="https://geomapfish-demo-2-8.camptocamp.com/api.js?version=2"&gt;&lt;/script&gt;
&lt;script&gt;
Expand Down
16 changes: 1 addition & 15 deletions src/controllers/bootstrap.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
// Copyright (c) 2018-2023 Camptocamp SA
// Copyright (c) 2018-2024 Camptocamp SA
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand Down Expand Up @@ -59,20 +59,6 @@ function addStylesheet(stylesheetUrl) {
* @param {angular.IModule} module The module
*/
function bootstrap(module) {
// Hack to make the bootstrap type check working with polyfill.io
const oldObjectToString = Object.prototype.toString;
if (!oldObjectToString.toString().includes('[native code]')) {
Object.prototype.toString = function () {
if (this === null) {
return '[object Null]';
}
if (this === undefined) {
return '[object Undefined]';
}
return oldObjectToString.call(this);
};
}

const interface_ = $('meta[name=interface]')[0].getAttribute('content');
const dynamicUrl_ = $('meta[name=dynamicUrl]')[0].getAttribute('content');
const appNameMeta = $('meta[name=appName]')[0];
Expand Down

0 comments on commit 81e11ee

Please sign in to comment.