mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-24 16:02:55 +02:00
Fix Edge pasting exception (#1286)
This commit is contained in:
committed by
Ian Storm Taylor
parent
3f25e6a902
commit
b558872b56
@@ -158,7 +158,10 @@ function getType(transfer, type) {
|
|||||||
return type == TEXT ? transfer.getData('Text') || null : null
|
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
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user