1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-31 02:49:56 +02:00

restrict globals that are permitted for linting (#1077)

This commit is contained in:
Ian Storm Taylor
2017-09-07 08:54:35 -07:00
committed by GitHub
parent ad24622e88
commit 2b168541dc
2 changed files with 2 additions and 1 deletions

View File

@@ -79,6 +79,7 @@
"no-path-concat": "error",
"no-redeclare": "error",
"no-regex-spaces": "error",
"no-restricted-globals": ["error", "Debug", "Document", "event", "history", "History", "length", "Map", "Node", "parent", "Range", "Selection", "Set", "Text"],
"no-sequences": "error",
"no-shadow": "error",
"no-shadow-restricted-names": "error",

View File

@@ -25,7 +25,7 @@ function extendSelection(selection, el, offset) {
anchor.setStart(selection.anchorNode, selection.anchorOffset)
focus.setStart(el, offset)
const v = focus.compareBoundaryPoints(Range.START_TO_START, anchor)
const v = focus.compareBoundaryPoints(window.Range.START_TO_START, anchor)
// If the focus is after the anchor...
if (v >= 0) {