kopia lustrzana https://github.com/OpenDroneMap/WebODM
Silence annoying React deprecation notice of useful functionality
rodzic
a44c2ce86f
commit
e7337f3b5d
|
@ -8,6 +8,16 @@ import { setLocale } from './translations/functions';
|
||||||
|
|
||||||
// Main is always executed first in the page
|
// Main is always executed first in the page
|
||||||
|
|
||||||
|
// Silence annoying React deprecation notice of useful functionality
|
||||||
|
const originalError = console.error;
|
||||||
|
console.error = function(...args) {
|
||||||
|
let message = args[0];
|
||||||
|
if (typeof message === 'string' && message.indexOf('Warning: A future version of React will block javascript:') !== -1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
originalError.apply(console, args);
|
||||||
|
};
|
||||||
|
|
||||||
// We share some objects to avoid having to include them
|
// We share some objects to avoid having to include them
|
||||||
// as a dependency in each component (adds too much space overhead)
|
// as a dependency in each component (adds too much space overhead)
|
||||||
window.ReactDOM = ReactDOM;
|
window.ReactDOM = ReactDOM;
|
||||||
|
|
Ładowanie…
Reference in New Issue