Socket
Socket
Sign inDemoInstall

react-images-upload

Package Overview
Dependencies
2
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.6 to 1.2.7

12

compiled.js

@@ -29,2 +29,4 @@ 'use strict';

function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

@@ -53,3 +55,3 @@

_this.state = {
pictures: props.defaultImage ? [props.defaultImage] : [],
pictures: [].concat(_toConsumableArray(props.defaultImages)),
files: [],

@@ -81,4 +83,4 @@ notAcceptedFileType: [],

value: function componentWillReceiveProps(nextProps) {
if (nextProps.defaultImage) {
this.setState({ pictures: [nextProps.defaultImage] });
if (nextProps.defaultImages !== this.props.defaultImages) {
this.setState({ pictures: nextProps.defaultImages });
}

@@ -385,3 +387,3 @@ }

onChange: function onChange() {},
defaultImage: ""
defaultImages: []
};

@@ -414,5 +416,5 @@

singleImage: _propTypes2.default.bool,
defaultImage: _propTypes2.default.string
defaultImages: _propTypes2.default.array
};
exports.default = ReactImageUploadComponent;

@@ -19,3 +19,3 @@ import React from 'react';

this.state = {
pictures: props.defaultImage ? [props.defaultImage] : [],
pictures: [...props.defaultImages],
files: [],

@@ -41,4 +41,4 @@ notAcceptedFileType: [],

componentWillReceiveProps(nextProps){
if(nextProps.defaultImage){
this.setState({pictures: [nextProps.defaultImage]});
if(nextProps.defaultImages !== this.props.defaultImages){
this.setState({pictures: nextProps.defaultImages});
}

@@ -269,3 +269,3 @@ }

onChange: () => {},
defaultImage: ""
defaultImages: []
};

@@ -298,5 +298,5 @@

singleImage: PropTypes.bool,
defaultImage: PropTypes.string
defaultImages: PropTypes.array
};
export default ReactImageUploadComponent;
{
"name": "react-images-upload",
"version": "1.2.6",
"version": "1.2.7",
"private": false,

@@ -5,0 +5,0 @@ "main": "compiled.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc