2018-10-29 01:43:29 +03:00
|
|
|
/**
|
2021-12-31 02:08:43 +03:00
|
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
2018-10-29 01:43:29 +03:00
|
|
|
*
|
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
|
|
|
*
|
2020-07-22 19:43:45 +03:00
|
|
|
* @flow strict
|
2018-10-29 01:43:29 +03:00
|
|
|
* @format
|
|
|
|
*/
|
2019-10-16 20:03:47 +03:00
|
|
|
|
2018-10-29 01:43:29 +03:00
|
|
|
'use strict';
|
|
|
|
|
2019-05-08 18:44:25 +03:00
|
|
|
const {polyfillObjectProperty} = require('../Utilities/PolyfillFunctions');
|
2018-10-29 01:43:29 +03:00
|
|
|
|
|
|
|
let navigator = global.navigator;
|
|
|
|
if (navigator === undefined) {
|
|
|
|
global.navigator = navigator = {};
|
|
|
|
}
|
|
|
|
|
|
|
|
// see https://github.com/facebook/react-native/issues/10881
|
|
|
|
polyfillObjectProperty(navigator, 'product', () => 'ReactNative');
|