mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-02-13 11:44:55 +01:00
Fix Edge pasting exception (#1286)
This commit is contained in:
parent
3f25e6a902
commit
b558872b56
@ -158,7 +158,10 @@ function getType(transfer, type) {
|
||||
return type == TEXT ? transfer.getData('Text') || null : null
|
||||
}
|
||||
|
||||
return transfer.types.indexOf(type) !== -1 ? transfer.getData(type) || null : null
|
||||
// COMPAT: In Edge, transfer.types doesn't respond to `indexOf`. (2017/10/25)
|
||||
const types = Array.from(transfer.types)
|
||||
|
||||
return types.indexOf(type) !== -1 ? transfer.getData(type) || null : null
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user