Skip to content

Commit 0c28971

Browse files
committed
- bug fix: check ccfg existence before using it
- bump version
1 parent 316a94d commit 0c28971

File tree

8 files changed

+16
-11
lines changed

8 files changed

+16
-11
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Change Logs
22

3+
## v0.6.4
4+
5+
- bug fix: check `ccfg` existence before using it
6+
7+
38
## v0.6.3
49

510
- bug fix: sliders is covered by grid due to z-index issue

dist/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@
766766
var row, col, data, range, src, touched, ref$, i$, to$, r, j$, to1$, c, key$;
767767
row = arg$.row, col = arg$.col, data = arg$.data, range = arg$.range, src = arg$.src;
768768
if (!range) {
769-
if (src && this._ccfg({
769+
if (src && this._ccfg && this._ccfg({
770770
row: row,
771771
col: col,
772772
type: 'readonly'
@@ -786,7 +786,7 @@
786786
r = i$;
787787
for (j$ = 0, to1$ = data[r].length; j$ < to1$; ++j$) {
788788
c = j$;
789-
if (src && this._ccfg({
789+
if (src && this._ccfg && this._ccfg({
790790
row: row + r,
791791
col: col + c,
792792
type: 'readonly'

dist/index.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "@plotdb/sheet",
44
"license": "MIT",
55
"description": "spreadsheet",
6-
"version": "0.6.3",
6+
"version": "0.6.4",
77
"style": "dist/index.min.css",
88
"browser": "dist/index.min.js",
99
"main": "dist/index.min.js",

src/index.ls

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,15 +369,15 @@ sheet.prototype = Object.create(Object.prototype) <<< do
369369
370370
set: ({row, col, data, range, src}) ->
371371
if !range =>
372-
if src and @_ccfg({row, col, type: \readonly}) => return
372+
if src and @_ccfg and @_ccfg({row, col, type: \readonly}) => return
373373
touched = true
374374
@_data[][row][col] = data
375375
@_content {y: row - @pos.row + @xif.row.1, x: col - @pos.col + @xif.col.1}
376376
else
377377
touched = false
378378
data = JSON.parse(JSON.stringify data)
379379
for r from 0 til data.length => for c from 0 til data[r].length =>
380-
if src and @_ccfg({row: row + r, col: col + c, type: \readonly}) =>
380+
if src and @_ccfg and @_ccfg({row: row + r, col: col + c, type: \readonly}) =>
381381
data[r][c] = @_data[][r + row][c + col]
382382
continue
383383
touched = true

web/static/assets/lib/@plotdb/sheet/dev/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@
766766
var row, col, data, range, src, touched, ref$, i$, to$, r, j$, to1$, c, key$;
767767
row = arg$.row, col = arg$.col, data = arg$.data, range = arg$.range, src = arg$.src;
768768
if (!range) {
769-
if (src && this._ccfg({
769+
if (src && this._ccfg && this._ccfg({
770770
row: row,
771771
col: col,
772772
type: 'readonly'
@@ -786,7 +786,7 @@
786786
r = i$;
787787
for (j$ = 0, to1$ = data[r].length; j$ < to1$; ++j$) {
788788
c = j$;
789-
if (src && this._ccfg({
789+
if (src && this._ccfg && this._ccfg({
790790
row: row + r,
791791
col: col + c,
792792
type: 'readonly'

web/static/assets/lib/@plotdb/sheet/dev/index.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)