mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-25 05:03:07 +00:00
Add exit clause for static builds
This commit is contained in:
@@ -11,6 +11,10 @@
|
||||
// https://github.com/facebook/react/issues/12460
|
||||
|
||||
export default function patchDOMForGoogleTranslate() {
|
||||
if (typeof Node !== 'function' || Node.prototype == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
const originalRemoveChild = Node.prototype.removeChild;
|
||||
// $FlowFixMe Intentionally monkepatching.
|
||||
Node.prototype.removeChild = function(child) {
|
||||
|
||||
Reference in New Issue
Block a user