@fto-consult/common
Version:
Un ensemble de bibliothèques et d'utilistaires communs pour le développement d'applications javascript
17 lines (16 loc) • 572 B
JavaScript
// Copyright 2022 @fto-consult/Boris Fouomene. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
if(typeof window != "undefined" && window){
if(!window.URL || !window.URLSearchParams){
const polyfill = require('react-native-url-polyfill');
Object.defineProperties(window,{
URL : {
value : polyfill.URL,
},
URLSearchParams : {
value : polyfill.URLSearchParams,
}
})
}
}