mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-22 12:21:13 +00:00
Move fetchPageTitle into componentWillMount and only call client side. (#2519)
This commit is contained in:
parent
66c60d9f14
commit
300ed5fe03
1 changed files with 4 additions and 1 deletions
|
@ -44,6 +44,7 @@ import { LanguageSelect } from "../common/language-select";
|
|||
import { MarkdownTextArea } from "../common/markdown-textarea";
|
||||
import { SearchableSelect } from "../common/searchable-select";
|
||||
import { PostListings } from "./post-listings";
|
||||
import { isBrowser } from "@utils/browser";
|
||||
|
||||
const MAX_POST_TITLE_LENGTH = 200;
|
||||
|
||||
|
@ -367,8 +368,10 @@ export class PostForm extends Component<PostFormProps, PostFormState> {
|
|||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
if (this.state.form.url) {
|
||||
componentWillMount() {
|
||||
if (this.state.form.url && isBrowser()) {
|
||||
this.fetchPageTitle();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue