compulim/react-dictate-button

Angular/zone.js messed up with Symbol.iterator

compulim opened this issue · 0 comments

Unfortunately, we can't use newer featurew like iterable object unless zone.js fix their bug, opened 4 years ago.

Fix this line, https://github.com/compulim/react-dictate-button/blob/master/packages/component/src/Composer.js#L139.

const results = [].map.call(rawResults, ([firstAlt]) => ({
  confidence: firstAlt.confidence,
  transcript: firstAlt.transcript
}));

To become:

const results = [].map.call(rawResults, alts => ({
  confidence: alts[0].confidence,
  transcript: alts[0].transcript
}));