Skip to content

[$50] Cannot read property 'add' of null #2916

@vikasrohit

Description

@vikasrohit

Expected behavior

Should not throw error in console

Actual behavior

For certain use case, it is throwing the mentioned error and it is reported by Sentry

Screenshot/screencast

TypeError: Cannot read property 'add' of null
  at ? (/main.ccb45b5919e555701f4f.js:23:38673)
  at Array.map(<anonymous>)
  at t.createProduct(/main.ccb45b5919e555701f4f.js:23:38527)
  at Object.createProduct(/main.ccb45b5919e555701f4f.js:114:83874)
  at t.value(/main.ccb45b5919e555701f4f.js:287:152657)
  at onClick(/main.ccb45b5919e555701f4f.js:287:160395)
  at Object.i(/main.ccb45b5919e555701f4f.js:33:4576)
  at s(/main.ccb45b5919e555701f4f.js:33:2777)
  at Object.executeDispatchesInOrder(/main.ccb45b5919e555701f4f.js:33:3506)
  at d(/main.ccb45b5919e555701f4f.js:28:114025)
  at f(/main.ccb45b5919e555701f4f.js:28:114151)
  at Array.forEach(<anonymous>)
  at e.exports(/main.ccb45b5919e555701f4f.js:77:295485)
  at Object.processEventQueue(/main.ccb45b5919e555701f4f.js:28:115555)
  at ? (/main.ccb45b5919e555701f4f.js:114:27795)
  at Object.handleTopLevel [as _handleTopLevel](/main.ccb45b5919e555701f4f.js:114:27817)
  at f(/main.ccb45b5919e555701f4f.js:114:49978)
  at c.perform(/main.ccb45b5919e555701f4f.js:28:168729)
  at Object.batchedUpdates(/main.ccb45b5919e555701f4f.js:114:49458)
  at Object.batchedUpdates(/main.ccb45b5919e555701f4f.js:28:13803)
  at dispatchEvent(/main.ccb45b5919e555701f4f.js:114:50759)
  at HTMLDocument.d(raven.js:386:29)

More specific code block identified by Sentry:

snip} ne",null),r=(0,y.getPhaseActualData)(e,n);return r.endDate.add(1,"day")}),a=(0,p.default)().hours(0).minutes(0).seconds(0).milliseconds(0),s {snip}

--

Environment

  • OS: Windows 10
  • Browser (w/version): Chrome 68.0.3440
  • User role (client, copilot or manager): Manager
  • Account used: N/A

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions