Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

draft-js-plugins-editor

Package Overview
Dependencies
Maintainers
2
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

draft-js-plugins-editor - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

3

CHANGELOG.md

@@ -6,2 +6,5 @@ # Change Log

## 2.0.3
- Bugfix - componentWillReceiveProps causes infite update loop in some circumstances
## 2.0.2

@@ -8,0 +11,0 @@ - Automatically update decoratorless editorState upon props update

16

lib/Editor/index.js

@@ -97,7 +97,13 @@ 'use strict';

value: function componentWillReceiveProps(next) {
if (this.props.editorState.getDecorator() !== null && this.props.editorState.getDecorator() !== next.editorState.getDecorator()) {
var decorator = this.props.editorState.getDecorator();
var editorState = _draftJs.EditorState.set(next.editorState, { decorator: decorator });
this.onChange((0, _moveSelectionToEnd2.default)(editorState));
}
var curr = this.props;
var currDec = curr.editorState.getDecorator();
var nextDec = next.editorState.getDecorator();
if (currDec === nextDec) return;
if (currDec && nextDec && currDec.decorators.size === nextDec.decorators.size) return;
if (!currDec && nextDec) return;
var decorator = curr.editorState.getDecorator();
var editorState = _draftJs.EditorState.set(next.editorState, { decorator: decorator });
this.onChange(editorState);
}

@@ -104,0 +110,0 @@ }, {

{
"name": "draft-js-plugins-editor",
"version": "2.0.2",
"version": "2.0.3",
"description": "Editor for DraftJS Plugins",

@@ -5,0 +5,0 @@ "author": {

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc