@leankylin-sheet/core 5.2.72 → 5.2.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -36886,6 +36886,9 @@ function helpFunctionExe($editer, currSelection, ctx) {
36886
36886
  if ($prev == null) {
36887
36887
  return null;
36888
36888
  }
36889
+ if (i < 0 || i >= $span.length || !($span[i] instanceof Element)) {
36890
+ return null;
36891
+ }
36889
36892
  var funcName = null;
36890
36893
  if ($span[i].classList.contains("luckysheet-formula-text-func")) {
36891
36894
  funcName = $span[i].textContent;
@@ -36921,6 +36924,9 @@ function helpFunctionExe($editer, currSelection, ctx) {
36921
36924
  function rangeHightlightselected(ctx, $editor) {
36922
36925
  var currSelection = getrangeseleciton();
36923
36926
  if (!currSelection) return;
36927
+ if (!($editor.contains(currSelection) || $editor === currSelection) || currSelection.nodeType !== Node.ELEMENT_NODE) {
36928
+ return;
36929
+ }
36924
36930
  var currText = _.trimStart(currSelection.textContent || "");
36925
36931
  if (currText === null || currText === void 0 ? void 0 : currText.match(/^[a-zA-Z_]+$/)) {
36926
36932
  searchFunction(ctx, currText.toUpperCase());
package/dist/index.js CHANGED
@@ -36896,6 +36896,9 @@ function helpFunctionExe($editer, currSelection, ctx) {
36896
36896
  if ($prev == null) {
36897
36897
  return null;
36898
36898
  }
36899
+ if (i < 0 || i >= $span.length || !($span[i] instanceof Element)) {
36900
+ return null;
36901
+ }
36899
36902
  var funcName = null;
36900
36903
  if ($span[i].classList.contains("luckysheet-formula-text-func")) {
36901
36904
  funcName = $span[i].textContent;
@@ -36931,6 +36934,9 @@ function helpFunctionExe($editer, currSelection, ctx) {
36931
36934
  function rangeHightlightselected(ctx, $editor) {
36932
36935
  var currSelection = getrangeseleciton();
36933
36936
  if (!currSelection) return;
36937
+ if (!($editor.contains(currSelection) || $editor === currSelection) || currSelection.nodeType !== Node.ELEMENT_NODE) {
36938
+ return;
36939
+ }
36934
36940
  var currText = ___default['default'].trimStart(currSelection.textContent || "");
36935
36941
  if (currText === null || currText === void 0 ? void 0 : currText.match(/^[a-zA-Z_]+$/)) {
36936
36942
  searchFunction(ctx, currText.toUpperCase());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leankylin-sheet/core",
3
- "version": "5.2.72",
3
+ "version": "5.2.73",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "typings": "dist/index.d.ts",
@@ -13,7 +13,7 @@
13
13
  "build": "father-build"
14
14
  },
15
15
  "dependencies": {
16
- "@leankylin-sheet/formula-parser": "5.2.72",
16
+ "@leankylin-sheet/formula-parser": "5.2.73",
17
17
  "dayjs": "^1.11.0",
18
18
  "immer": "^9.0.12",
19
19
  "lodash": "^4.17.21",