diff --git a/src/components/fetch-wrapper.jsx b/src/components/fetch-wrapper.jsx
index ef80106e..a8c7a279 100644
--- a/src/components/fetch-wrapper.jsx
+++ b/src/components/fetch-wrapper.jsx
@@ -28,23 +28,6 @@ function withFetching(WrappedComponent, props) {
this.abort();
}
- render() {
- if (!this.xhr) {
- return
CORS not supported..
;
- }
-
- if (this.state.error) {
- return ;
- }
-
- if (this.state.data) {
- return ;
- }
- return (
-
- );
- }
-
createRequest(path) {
let xhr = new XMLHttpRequest();
@@ -86,6 +69,23 @@ function withFetching(WrappedComponent, props) {
this.xhr.abort();
}
}
+
+ render() {
+ if (!this.xhr) {
+ return CORS not supported..
;
+ }
+
+ if (this.state.error) {
+ return ;
+ }
+
+ if (this.state.data) {
+ return ;
+ }
+ return (
+
+ );
+ }
};
}