x25 5.1.2 → 5.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,33 +10,31 @@ var _react2 = _interopRequireDefault(_react);
10
10
 
11
11
  var _Loading = require("../Messages/Loading");
12
12
 
13
- var _SimulatedException = require("./SimulatedException");
13
+ var _Error = require("../Messages/Error");
14
14
 
15
- var _SimulatedException2 = _interopRequireDefault(_SimulatedException);
16
-
17
- var _index = require("./index");
15
+ var _Error2 = _interopRequireDefault(_Error);
18
16
 
19
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
18
 
21
- var IgnoreThisNode = function IgnoreThisNode(_ref) {
22
- var _ref$error = _ref.error,
23
- message = _ref$error.message,
24
- stack = _ref$error.stack;
19
+ var RouteLoading = function RouteLoading(_ref) {
20
+ var theError = _ref.error,
21
+ retry = _ref.retry,
22
+ timedOut = _ref.timedOut;
25
23
 
26
- throw new _SimulatedException2.default(message, stack);
27
- };
24
+ if (theError) {
28
25
 
29
- var RouteLoading = function RouteLoading(_ref2) {
30
- var error = _ref2.error,
31
- retry = _ref2.retry,
32
- timedOut = _ref2.timedOut;
26
+ // eslint-disable-next-line no-console
27
+ console.log("theError");
28
+ // eslint-disable-next-line no-console
29
+ console.log(theError.name);
30
+ // eslint-disable-next-line no-console
31
+ console.log(theError);
33
32
 
34
- if (error) {
35
- return _react2.default.createElement(
36
- _index.ErrorBoundary,
37
- null,
38
- _react2.default.createElement(IgnoreThisNode, { error: error })
39
- );
33
+ if (theError.name === "ChunkLoadError") {
34
+ return _react2.default.createElement(_Error2.default, { message: "Pagina nu a putut fi \xEEnc\u0103rcat\u0103. V\u0103 rug\u0103m s\u0103 face\u021Bi refresh la pagin\u0103" });
35
+ }
36
+
37
+ return null;
40
38
  }
41
39
 
42
40
  if (timedOut) {
@@ -60,5 +58,6 @@ var RouteLoading = function RouteLoading(_ref2) {
60
58
  _react2.default.createElement(_Loading.LoadingMessage, { message: "A\u0219teapt\u0103 un pic..." })
61
59
  );
62
60
  };
61
+ // import SimulatedException from "./SimulatedException";
63
62
 
64
63
  exports.default = RouteLoading;
@@ -12,17 +12,18 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
12
12
 
13
13
  /* eslint-disable max-classes-per-file */
14
14
 
15
+ // eslint-disable-next-line no-unused-vars
15
16
  var CustomError = function (_Error) {
16
17
  _inherits(CustomError, _Error);
17
18
 
18
- function CustomError(message, stack) {
19
+ function CustomError(error) {
19
20
  _classCallCheck(this, CustomError);
20
21
 
21
- var _this = _possibleConstructorReturn(this, (CustomError.__proto__ || Object.getPrototypeOf(CustomError)).call(this, message));
22
+ var _this = _possibleConstructorReturn(this, (CustomError.__proto__ || Object.getPrototypeOf(CustomError)).call(this, error));
22
23
 
23
- _this.message = message;
24
- _this.name = message;
25
- _this.stack = stack;
24
+ _this.message = error.message;
25
+ _this.name = error.name;
26
+ _this.stack = error.stack;
26
27
  return _this;
27
28
  }
28
29
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.1.2",
2
+ "version": "5.1.5",
3
3
  "name": "x25",
4
4
  "description": "x25",
5
5
  "scripts": {