1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-24 00:35:26 +03:00

replaceAll-workaround (#3348)

This commit is contained in:
Mark Haslinghuis 2023-02-22 15:35:53 +01:00 committed by GitHub
parent 4b9fab6635
commit 62f5cecd71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,6 +20,12 @@ import { checkForConfiguratorUpdates } from './utils/checkForConfiguratorUpdates
import * as THREE from 'three';
import * as d3 from 'd3';
if (typeof String.prototype.replaceAll === "undefined") {
String.prototype.replaceAll = function(match, replace) {
return this.replace(new RegExp(match, 'g'), () => replace);
};
}
$(document).ready(function () {
useGlobalNodeFunctions();