File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,13 @@ class Clipboard implements IClipboard {
6969 }
7070 const copyPaster = document . createElement < 'textarea' > ( 'textarea' ) ;
7171 copyPaster . style . cssText = 'position: absolute;left: -9999px;top:-100px' ;
72- document . body . appendChild ( copyPaster ) ;
72+ if ( document . body ) {
73+ document . body . appendChild ( copyPaster ) ;
74+ } else {
75+ document . addEventListener ( 'DOMContentLoaded' , ( ) => {
76+ document . body . appendChild ( copyPaster ) ;
77+ } ) ;
78+ }
7379 const dispose = this . initCopyPaster ( copyPaster ) ;
7480 return ( ) => {
7581 dispose ( ) ;
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ export interface IPublicApiMaterial {
1515 * set data for Assets
1616 * @returns void
1717 */
18- setAssets ( assets : IPublicTypeAssetsJson ) : void ;
18+ setAssets ( assets : IPublicTypeAssetsJson ) : Promise < void > ;
1919
2020 /**
2121 * 获取「资产包」结构
You can’t perform that action at this time.
0 commit comments