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

!21144 修改示例代码报错

Merge pull request !21144 from 李芮/master
...@@ -484,7 +484,7 @@ function onPublishCallback(err, node:dataShare.PublishedDataChangeNode) { ...@@ -484,7 +484,7 @@ function onPublishCallback(err, node:dataShare.PublishedDataChangeNode) {
for (let i = 0; i < node.data.length; i++) { for (let i = 0; i < node.data.length; i++) {
console.info("onPublishCallback node " + typeof node.data[i].data); console.info("onPublishCallback node " + typeof node.data[i].data);
if (typeof node.data[i].data != 'string') { if (typeof node.data[i].data != 'string') {
let array:ArrayBuffer = node.data[i].data; let array:ArrayBuffer = node.data[i].data as ArrayBuffer;
let data:Uint8Array = new Uint8Array(array); let data:Uint8Array = new Uint8Array(array);
console.info("onPublishCallback " + i + " " + JSON.stringify(data)); console.info("onPublishCallback " + i + " " + JSON.stringify(data));
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册