Skip to content

Commit

Permalink
Removed spread operator usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Baker authored and enjibby committed Jul 12, 2023
1 parent 4ecbdb8 commit f4aa3ad
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 11 deletions.
4 changes: 1 addition & 3 deletions packages/tiptap-extensions/dist/extensions.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -1127,9 +1127,7 @@ function SuggestionsPlugin(_ref2) {
// Apply changes to the plugin state from a view transaction.
apply: function apply(tr, prev) {
var selection = tr.selection;

var next = _objectSpread2({}, prev); // We can only be suggesting if there is no selection

var next = Object.assign({}, prev); // We can only be suggesting if there is no selection

if (selection.from === selection.to) {
// Reset active state if we just left the previous suggestion range
Expand Down
4 changes: 1 addition & 3 deletions packages/tiptap-extensions/dist/extensions.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -1121,9 +1121,7 @@ function SuggestionsPlugin(_ref2) {
// Apply changes to the plugin state from a view transaction.
apply: function apply(tr, prev) {
var selection = tr.selection;

var next = _objectSpread2({}, prev); // We can only be suggesting if there is no selection

var next = Object.assign({}, prev); // We can only be suggesting if there is no selection

if (selection.from === selection.to) {
// Reset active state if we just left the previous suggestion range
Expand Down
4 changes: 1 addition & 3 deletions packages/tiptap-extensions/dist/extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -1117,9 +1117,7 @@
// Apply changes to the plugin state from a view transaction.
apply: function apply(tr, prev) {
var selection = tr.selection;

var next = _objectSpread2({}, prev); // We can only be suggesting if there is no selection

var next = Object.assign({}, prev); // We can only be suggesting if there is no selection

if (selection.from === selection.to) {
// Reset active state if we just left the previous suggestion range
Expand Down
2 changes: 1 addition & 1 deletion packages/tiptap-extensions/dist/extensions.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/tiptap-extensions/src/plugins/Suggestions.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export default function SuggestionsPlugin({
// Apply changes to the plugin state from a view transaction.
apply(tr, prev) {
const { selection } = tr
const next = { ...prev }
const next = Object.assign({}, prev)

// We can only be suggesting if there is no selection
if (selection.from === selection.to) {
Expand Down

0 comments on commit f4aa3ad

Please sign in to comment.