undefined is not an object (evaluating 'originalFactory.call')