Square-connect示例函数给出了一个"然后它不是一个函数"错误

时间:2018-02-11 17:16:37

标签: square-connect

安装square-connect并运行测试代码后,我看到:

api.listLocations.then不是函数

节点-v V9.4.0

我需要做些什么特别的事情吗?不在安装说明中?

1 个答案:

答案 0 :(得分:1)

您阅读的示例代码中存在错误(感谢您提请我们注意!)。只要this pull request合并,它就会被修复。

而不是api.listLocations.then(function(data) {,您应该使用api.listLocations().then(function(data) {