How to set a Date value to an object's value that could be undefined in Javascript

前端 未结 0 1530
天涯浪人
天涯浪人 2020-12-14 22:34

Short version: I want to write a check that says if this piece of data from the GraphQL query is undefined, set it to 1 week ago. How do I write this in the return in a type

相关标签:
回答
  • 消灭零回复
提交回复
热议问题