We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa7b498 commit 8ad5ed7Copy full SHA for 8ad5ed7
src/loaders/ObjectLoader.js
@@ -138,9 +138,26 @@ class ObjectLoader extends Loader {
138
139
}
140
141
- if ( json.images === undefined || json.images.length === 0 ) {
+ //
142
143
- if ( onLoad !== undefined ) onLoad( object );
+ let hasImages = false;
144
+
145
+ for ( const uuid in images ) {
146
147
+ if ( images[ uuid ] instanceof HTMLImageElement ) {
148
149
+ hasImages = true;
150
+ break;
151
152
+ }
153
154
155
156
+ // only fire onLoad() if no HTMLImageElements were loaded
157
158
+ if ( hasImages === false && onLoad !== undefined ) {
159
160
+ onLoad( object );
161
162
163
0 commit comments