jemgold / figma-js

Little wrapper (+ types) for the Figma API
https://jongold.github.io/figma-js/
MIT License
490 stars 47 forks source link

client.file Cannot read property 'join' of undefined #40

Closed dmiller9911 closed 4 years ago

dmiller9911 commented 4 years ago

Suggested fix:

    file: (fileId, params = {}) =>
      client.get(`files/${fileId}`, {
        params: {
          ...params,
          ids: params.ids ? params.ids.join(',') : '',
        },
      }),

Work around:

//before
client.file(fildId).then(() => {})

//after
client.file(fildId, { ids: [] }).then(() => {})