server/lib/scene/scene.addScene.js
Function addScene
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function addScene(sceneRaw) {
// deep clone the scene so that we don't modify the same object which will be returned to the client
const scene = cloneDeep(sceneRaw);
// first, if the scene actually exist, we cancel all triggers
this.cancelTriggers(scene.selector);