【问题标题】:Square-connect example function gives a ".then is not a function" errorSquare-connect 示例函数给出“.then 不是函数”错误
【发布时间】:2018-02-13 00:20:56
【问题描述】:

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

api.listLocations.then 不是函数

节点-v v9.4.0

有什么我需要做的不是安装说明中的特殊操作吗?

【问题讨论】:

    标签: square-connect


    【解决方案1】:

    您阅读的示例代码中有一个错误(感谢您提醒我们注意!)。每当this pull request 被合并时,它都会被修复。

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-04-02
      • 2020-09-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-12-26
      • 2017-10-07
      • 1970-01-01
      相关资源
      最近更新 更多