Skip to content

Commit 8cb8f8e

Browse files
committed
fix: 修复了角色,背景无法从库加载到舞台的问题(scratchfoundation#9885
1 parent 758c924 commit 8cb8f8e

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

src/containers/library-item.jsx

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,7 @@ class LibraryItem extends React.PureComponent {
141141
LibraryItem.propTypes = {
142142
bluetoothRequired: PropTypes.bool,
143143
collaborator: PropTypes.string,
144-
description: PropTypes.oneOfType([
145-
PropTypes.string,
146-
PropTypes.node
147-
]),
144+
description: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
148145
disabled: PropTypes.bool,
149146
extensionId: PropTypes.string,
150147
featured: PropTypes.bool,
@@ -154,21 +151,18 @@ LibraryItem.propTypes = {
154151
icons: PropTypes.arrayOf(
155152
PropTypes.shape({
156153
baseLayerMD5: PropTypes.string, // 2.0 library format, TODO GH-5084
157-
md5ext: PropTypes.string // 3.0 library format
154+
md5ext: PropTypes.string, // 3.0 library format
158155
})
159156
),
160-
id: PropTypes.number.isRequired,
157+
id: PropTypes.string.isRequired,
161158
insetIconURL: PropTypes.string,
162159
internetConnectionRequired: PropTypes.bool,
163160
isPlaying: PropTypes.bool,
164-
name: PropTypes.oneOfType([
165-
PropTypes.string,
166-
PropTypes.node
167-
]),
161+
name: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
168162
onMouseEnter: PropTypes.func.isRequired,
169163
onMouseLeave: PropTypes.func.isRequired,
170164
onSelect: PropTypes.func.isRequired,
171-
showPlayButton: PropTypes.bool
165+
showPlayButton: PropTypes.bool,
172166
};
173167

174168
export default injectIntl(LibraryItem);

webpack.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ const baseConfig = new ScratchWebpackConfigBuilder(
7676
context: 'node_modules/scratch-vm/dist/web',
7777
from: 'extension-worker.{js,js.map}',
7878
noErrorOnMissing: true
79+
},
80+
{
81+
context: 'node_modules/scratch-storage/dist/web',
82+
from: 'chunks/*.{js,js.map}',
83+
noErrorOnMissing: true
7984
}
8085
]
8186
}));

0 commit comments

Comments
 (0)