Polifylls Element interface type fixes and Selection util rangeCount extra condition (#555)

* hotfix

* update
This commit is contained in:
Murod Khaydarov 2018-12-07 09:37:14 +03:00 committed by GitHub
parent 0ad9484c75
commit 3d512d66ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 7 deletions

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,6 @@
{
"name": "codex.editor",
"version": "2.7.7",
"version": "2.7.8",
"description": "Codex Editor. Native JS, based on API and Open Source",
"main": "dist/codex-editor.js",
"types": "./types/index.d.ts",

View file

@ -9,8 +9,8 @@ interface Element {
msMatchesSelector: (selector: string) => boolean;
oMatchesSelector: (selector: string) => boolean;
prepend: (nodes: Node|Node[]|DocumentFragment) => void;
append: (nodes: Node|Node[]|DocumentFragment) => void;
prepend: (...nodes: Array<string | Node>) => void;
append: (...nodes: Array<string | Node>) => void;
}
/**

View file

@ -146,7 +146,7 @@ export default class SelectionUtils {
sel = window.getSelection();
if (!isNaN(sel.rangeCount)) {
if (sel.rangeCount === null || isNaN(sel.rangeCount)) {
_.log('Method SelectionUtils.rangeCount is not supported', 'warn');
return rect;
}