react-badly
Advanced tools
Comparing version 1.0.5 to 1.0.6
/** | ||
* react-badly v1.0.5 | ||
* react-badly v1.0.6 | ||
* https://github.com/maniator/react-badly#readme | ||
@@ -102,1 +102,3 @@ * @author Naftali Lubin <naftalilubin@gmail.com> | ||
}; | ||
export default ReactBadly; |
/** | ||
* react-badly v1.0.5 | ||
* react-badly v1.0.6 | ||
* https://github.com/maniator/react-badly#readme | ||
@@ -106,1 +106,3 @@ * @author Naftali Lubin <naftalilubin@gmail.com> | ||
}; | ||
module.exports = ReactBadly; |
/** | ||
* react-badly v1.0.5 | ||
* react-badly v1.0.6 | ||
* https://github.com/maniator/react-badly#readme | ||
@@ -8,2 +8,2 @@ * @author Naftali Lubin <naftalilubin@gmail.com> | ||
"use strict";function r(r){return r&&"object"==typeof r&&"default"in r?r.default:r}var e=r(require("@babel/runtime/helpers/classCallCheck")),t=r(require("@babel/runtime/helpers/createClass")),n=r(require("@babel/runtime/helpers/assertThisInitialized")),o=r(require("@babel/runtime/helpers/inherits")),i=r(require("@babel/runtime/helpers/possibleConstructorReturn")),u=r(require("@babel/runtime/helpers/getPrototypeOf")),c=r(require("@babel/runtime/helpers/defineProperty")),a=require("react"),s=r(require("prop-types"));function l(r){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(r){return!1}}();return function(){var t,n=u(r);if(e){var o=u(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return i(this,t)}}var f=function(){return null},p=function(r){return r&&"[object Function]"===Object.prototype.toString.call(r)},h=function(r){o(u,r);var i=l(u);function u(){var r;e(this,u);for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return r=i.call.apply(i,[this].concat(o)),c(n(r),"state",{hasError:!1}),r}return t(u,[{key:"componentDidCatch",value:function(r,e){var t=this.props.onError,n=p(t)?t:f;this.setState({hasError:!0,errorInformation:{error:r,info:e}},(function(){n(r,e)}))}},{key:"render",value:function(){var r=this.props,e=r.render,t=r.children,n=this.state,o=n.hasError,i=n.errorInformation;return o?p(e)?e(i):null:t}}]),u}(a.PureComponent);h.propTypes={children:s.node.isRequired,onError:s.func,render:s.func},h.defaultProps={onError:f,render:f}; | ||
"use strict";function r(r){return r&&"object"==typeof r&&"default"in r?r.default:r}var e=r(require("@babel/runtime/helpers/classCallCheck")),t=r(require("@babel/runtime/helpers/createClass")),n=r(require("@babel/runtime/helpers/assertThisInitialized")),o=r(require("@babel/runtime/helpers/inherits")),i=r(require("@babel/runtime/helpers/possibleConstructorReturn")),u=r(require("@babel/runtime/helpers/getPrototypeOf")),c=r(require("@babel/runtime/helpers/defineProperty")),a=require("react"),s=r(require("prop-types"));function l(r){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(r){return!1}}();return function(){var t,n=u(r);if(e){var o=u(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return i(this,t)}}var f=function(){return null},p=function(r){return r&&"[object Function]"===Object.prototype.toString.call(r)},h=function(r){o(u,r);var i=l(u);function u(){var r;e(this,u);for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return r=i.call.apply(i,[this].concat(o)),c(n(r),"state",{hasError:!1}),r}return t(u,[{key:"componentDidCatch",value:function(r,e){var t=this.props.onError,n=p(t)?t:f;this.setState({hasError:!0,errorInformation:{error:r,info:e}},(function(){n(r,e)}))}},{key:"render",value:function(){var r=this.props,e=r.render,t=r.children,n=this.state,o=n.hasError,i=n.errorInformation;return o?p(e)?e(i):null:t}}]),u}(a.PureComponent);h.propTypes={children:s.node.isRequired,onError:s.func,render:s.func},h.defaultProps={onError:f,render:f},module.exports=h; |
{ | ||
"name": "react-badly", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "Error boundary react component", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13003
185