Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion addon/components/3d-scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,14 @@ export default Ember.Component.extend({
// Setup objects.

instantiate(type) {
get(this, `config.${type}`).forEach((object) => {
let typeArr = get(this, `config.${type}`);

if (!typeArr || !(Array.isArray(typeArr))) {
console.info(`No instantiate of "${type}", due to not added objects of this type`);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can allow this to return silently - no need for console.info!

return;
}

typeArr.forEach((object) => {
let module = get(object, 'export');
if (typeOf(module) !== 'class') { return; }
module.create({
Expand Down