未验证 提交 a23491b7 编写于 作者: O openharmony_ci 提交者: Gitee

!21781 修复拖拽相关文档代码

Merge pull request !21781 from 郑齐熠/master
......@@ -88,13 +88,17 @@ struct Index {
getDataFromUdmfRetry(event: DragEvent, callback: (data: DragEvent)=>void)
{
let records: Array<udmf.UnifiedRecord> = event.getData().getRecords();
if (records.length !== 0) {
callback(event);
return true;
let data = event.getData();
if (!data) {
return false;
}
let records: Array<udmf.UnifiedRecord> = data.getRecords();
if (!records || records.length <= 0) {
return false;
}
callback(event);
return true;
}
getDataFromUdmf(event: DragEvent, callback: (data: DragEvent)=>void)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册