使用Pnp.js进行扩展和选择的IE 11错误

时间:2019-07-01 17:25:21

标签: javascript sharepoint internet-explorer-11

我遇到了一个一致的错误,该错误似乎只出现在IE上,在IE上pnp.js不会在函数调用时扩展或选择任何字段。这自然会引起问题

这是一个仅在我测试过的浏览器的IE 11上出现的问题。我测试过的所有现代浏览器(Firefox,Chrome,Edge)都可以正常呈现。我曾尝试询问共享点特定站点,但未收到任何回复。我还包括了polyfills

pnp.sp.web.lists.getByTitle(listName).items.select('Title,ID,IDCopy,Priority,Goal/ID,Goal/Title').expand('Goal/ID,Goal/Title').get().then(function(r)  { 
    console.log(r);
    // Other code here that does stuff.
});

我原本希望得到这样的扩展结果

Goal:
   ID: //various data
   Title: //various data 
   odata.id: 
   odata.type: 
   __proto__: Object
Goal@odata.navigationLinkUrl: 
ID: //various data
IDCopy: //various data
Id: //various data
Priority: //various data
Title: //various data
odata.editLink: 
odata.etag: 
odata.id: 
odata.type:

我确实在非IE浏览器上获得了该结果。但是在IE上我得到这样的结果:

   ArchiveG:
   Attachments: //various data
   AuthorId: //various data
   ComplianceAssetId: //various data
   ContentTypeId: //various data
   Created: //various data
   EditorId: //various data
   FileSystemObjectType: //various data
   GoalActi0: //various data
   GoalActi1: //various data
   GoalId: //various data
   GUID: //various data
   ID: //various data
   Id: //various data
   IDCopy: //various data
   LongTermBenefit_x002f_Quickwin: //various data 
   Modified:  //various data
   Notes: //various data
   odata.editLink: //various data
   odata.etag: //various data
   odata.id: //various data
   odata.type: //various data
   OData__UIVersionString: //various data
   Priority: //various data
   ServerRedirectedEmbedUri: //various data 
   ServerRedirectedEmbedUrl: //various data
   Title: //various data
   ToDelete: //various data

IE 11所没有的用于pollyfill功能的各种支持文件,例如答应之类的。

<script src="../polyfill.min.js" type="text/javascript"></script> 
<script src="../fetch.umd.js" type="text/javascript"></script> 
<script src="../pnpjs.es5.umd.bundle.min.js" type="text/javascript"></script>

0 个答案:

没有答案