fix: 3 locations with return undefined (not compatible with React 17)
This commit is contained in:
@ -9,7 +9,9 @@ type Props = {
|
|||||||
|
|
||||||
export default class Analytics extends React.Component<Props> {
|
export default class Analytics extends React.Component<Props> {
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
if (!env.GOOGLE_ANALYTICS_ID) return;
|
if (!env.GOOGLE_ANALYTICS_ID) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
// standard Google Analytics script
|
// standard Google Analytics script
|
||||||
window.ga =
|
window.ga =
|
||||||
|
@ -25,7 +25,7 @@ function NewDocumentMenu() {
|
|||||||
const can = policies.abilities(team.id);
|
const can = policies.abilities(team.id);
|
||||||
|
|
||||||
if (!can.createDocument) {
|
if (!can.createDocument) {
|
||||||
return;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (singleCollection) {
|
if (singleCollection) {
|
||||||
|
@ -23,7 +23,7 @@ function NewTemplateMenu() {
|
|||||||
const can = policies.abilities(team.id);
|
const can = policies.abilities(team.id);
|
||||||
|
|
||||||
if (!can.createDocument) {
|
if (!can.createDocument) {
|
||||||
return;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
Reference in New Issue
Block a user