Skip to content

Commit

Permalink
refactor: udpate get actived plugin for render element
Browse files Browse the repository at this point in the history
  • Loading branch information
afeiship committed Feb 5, 2021
1 parent 68f6eba commit 64e98e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,19 @@
"peerDependencies": {
"react": "^16.13.1",
"react-dom": "^16.13.1",
"prop-types": "^15.7.2"
"prop-types": "^15.7.2",
"@jswork/next": "^1.0.5",
"classnames": "^2.2.6",
"slate": "^0.59.0",
"slate-react": "^0.59.0"
},
"dependencies": {
"@jswork/next-compose": "^1.0.0",
"@jswork/next-css-text": "^1.0.0",
"@jswork/next-slate-defaults": "^1.0.1",
"@jswork/next-slate-deserialize": "^1.0.7",
"@jswork/next-slate-serialize": "^1.0.6",
"@jswork/noop": "^1.0.0",
"classnames": "^2.2.6",
"slate": "^0.59.0",
"slate-react": "^0.59.0"
"@jswork/noop": "^1.0.0"
},
"publishConfig": {
"access": "public",
Expand Down
3 changes: 1 addition & 2 deletions src/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ export default class ReactRteSlate extends Component {
*/
renderElement = (inProps) => {
const { element, children, attributes } = inProps;
const { plugins } = this.props;
const plugin = plugins.find((plg) => plg.id === element.type);
const plugin = this.getActivePlugin(element);
const style = NxCssText.css2obj(
nx.get(attributes, 'ref.current.style.cssText')
);
Expand Down

0 comments on commit 64e98e9

Please sign in to comment.