1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-09-02 03:32:36 +02:00

fix missing warning import

This commit is contained in:
Ian Storm Taylor
2016-11-17 18:00:50 -08:00
parent 1a4ee5e1ec
commit 6a7ba1346f

View File

@@ -6,7 +6,7 @@ import Data from '../models/data'
import Mark from '../models/mark' import Mark from '../models/mark'
import Selection from '../models/selection' import Selection from '../models/selection'
import Text from '../models/text' import Text from '../models/text'
import warning from './warning' import warn from './warn'
import typeOf from 'type-of' import typeOf from 'type-of'
/** /**
@@ -59,7 +59,7 @@ function inline(value) {
function key(value) { function key(value) {
if (typeOf(value) == 'string') return value if (typeOf(value) == 'string') return value
warning('Deprecation: Passing a node instead of a key to a method accepting a key can reduce performances') warn('Deprecation: Passing a node instead of a key to a method accepting a key can reduce performances')
if (value instanceof Block) return value.key if (value instanceof Block) return value.key
if (value instanceof Document) return value.key if (value instanceof Document) return value.key
if (value instanceof Inline) return value.key if (value instanceof Inline) return value.key