"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.setNodeSelection = void 0;
var _state = require("@atlaskit/editor-prosemirror/state");
var setNodeSelection = exports.setNodeSelection = function setNodeSelection(view, pos) {
  var state = view.state,
    dispatch = view.dispatch;
  if (!isFinite(pos)) {
    return;
  }
  var tr = state.tr.setSelection(_state.NodeSelection.create(state.doc, pos));
  dispatch(tr);
};