return {
                  
                  
                        info: null,
                  
                  
                        sts: null
                  
                  
                      };
                  
                  
                    },
                  
                  
                    methods: {
                  
                  
                      getRes: function() {
                  
                  
                  
                  
                  
                        axios.get('https://picsum.photos/id/237/1000/300').then(response => (this.sts = response.status));
                  
                  
                  
                  
                  
                        if (this.sts == 404) {
                  
                  
                          axios.get('https://picsum.photos/id/237/200/300').then(response => (this.info = response.config.url));
                  
                  
                        }
                  
                  
                  
                  
                  
                      }
                  
                  
                    }
                  
                  
                  });
                  
                  
                  
                  
                  
                  Что тут не так?
                  
                  
                
Условие не внутри промиса. Ты синхронно пытаешься проверить асинхронный результат
Обсуждают сегодня