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 @@ -73,7 +73,13 @@ class Clipboard implements IClipboard {
7373 }
7474 const copyPaster = document . createElement < 'textarea' > ( 'textarea' ) ;
7575 copyPaster . style . cssText = 'position: absolute;left: -9999px;top:-100px' ;
76- document . body . appendChild ( copyPaster ) ;
76+ if ( document . body ) {
77+ document . body . appendChild ( copyPaster ) ;
78+ } else {
79+ document . addEventListener ( 'DOMContentLoaded' , ( ) => {
80+ document . body . appendChild ( copyPaster ) ;
81+ } ) ;
82+ }
7783 const dispose = this . initCopyPaster ( copyPaster ) ;
7884 return ( ) => {
7985 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