Uncaught (in promise) TypeError: _this.tasks.push is not a function

Uncaught (in promise) TypeError: _this.tasks.push is not a function

我整天都在网上冲浪...求助。我有 Vue.js 个应用程序。在我的组件中,我将我的数据数组变量等同于来自服务器的响应。但是当我尝试将一些数据推送到数组时,会出现此错误:Uncaught (in promise) TypeError: _this.tasks.push is not a function。我试图注销响应,它返回了这个:

{__ob__: Observer}
8
:
(...)
9
:
(...)
15
:
(...)
__ob__
:
Observer {value: {…}, dep: Dep, vmCount: 0}
get 8
:
ƒ reactiveGetter()
set 8
:
ƒ reactiveSetter(newVal)
get 9
:
ƒ reactiveGetter()
set 9
:
ƒ reactiveSetter(newVal)
get 15
:
ƒ reactiveGetter()
set 15
:
ƒ reactiveSetter(newVal)
__proto__
:
Object

这是我的组件js代码

import User from '../../services/UserService';
    export default {
        data() {
            return {
                taskText: '',
                tasks: []
            }
        },
        methods: {
            createNewTask() {
                User.createUserTask(this.taskText).then(response => {
                    if (response) {
                        this.tasks.push(response);
                        this.taskText = '';
                        Materialize.toast('Task was added', 4000);
                    }
                });
            },
            markTaskAsDone(taskId) {
                User.markTaskAsDone(taskId).then(response => {
                    if (response) {
                        this.tasks = this.tasks.filter(task => task.id !== taskId);
                        Materialize.toast('Task was completed', 4000);
                    }
                });
            }
        },
        mounted() {
            const toast = Materialize.toast('Loading...');
            User.getUserTasks().then(response => {
                if (response) {
                    this.tasks = response;
                    toast.remove();
                    console.log(response);
                }
            });
        }
    }

我做错了什么?

我能做出的唯一推论是,response 不是此均衡的 数组

this.tasks = response;