Skip to content

Shorthand prop name makes quickstart fail #15

@toasterpic

Description

@toasterpic

Expected Behavior

see https://developers.google.com/drive/api/v3/quickstart/nodejs#step_4_run_the_sample

Actual Behavior

(node:36003) UnhandledPromiseRejectionWarning: TypeError: Cannot destructure property data of 'undefined' or 'null'. in quickstart.js line 75.

Steps to Reproduce the Problem

  1. follow https://developers.google.com/drive/api/v3/quickstart/nodejs => failure
  2. change line 75 from }, (err, {data}) => { to: }, (err, response) => { and line 77 from const files = data.files; to const files = response.data.files; => success

Specifications

  • Node version (node -v) v8.11.3 (LTS)
  • OS (Mac)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions