mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-02-24 09:13:24 +01:00
fix missing warning import
This commit is contained in:
parent
1a4ee5e1ec
commit
6a7ba1346f
@ -6,7 +6,7 @@ import Data from '../models/data'
|
||||
import Mark from '../models/mark'
|
||||
import Selection from '../models/selection'
|
||||
import Text from '../models/text'
|
||||
import warning from './warning'
|
||||
import warn from './warn'
|
||||
import typeOf from 'type-of'
|
||||
|
||||
/**
|
||||
@ -59,7 +59,7 @@ function inline(value) {
|
||||
function key(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 Document) return value.key
|
||||
if (value instanceof Inline) return value.key
|
||||
|
Loading…
x
Reference in New Issue
Block a user