Commit fd4ec837 by Иван Кубота

no products bug fix

parent 2e638366
Pipeline #570 failed with stage
...@@ -534,8 +534,9 @@ module.exports = { ...@@ -534,8 +534,9 @@ module.exports = {
photo = option.photo, //seeded() > 0.7, photo = option.photo, //seeded() > 0.7,
result, attempts = 0; result, attempts = 0;
let noProducts = Object.keys(ctx.dP.products).length === 0
while(!result){ while(!result){
if( ( args.type !== void 0 ? args.type === 2 : seeded() > 0.5 ) ){ if( ( args.type !== void 0 ? args.type === 2 : seeded() > 0.5 ) || noProducts ){
result = ctx.standardGenerator( () => rand( 1, countStdQ ) ) result = ctx.standardGenerator( () => rand( 1, countStdQ ) )
}else{ }else{
result = ctx.quizGenerator( result = ctx.quizGenerator(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment