Implement Export in YNAB-Format #15
@ -93,7 +93,7 @@ func (n Numeric) Add(other Numeric) Numeric {
|
||||
}
|
||||
|
||||
func (n Numeric) String() string {
|
||||
if n.Int.Int64() == 0 {
|
||||
if n.Int == nil || n.Int.Int64() == 0 {
|
||||
return "0"
|
||||
}
|
||||
|
||||
@ -130,7 +130,7 @@ func (n Numeric) String() string {
|
||||
}
|
||||
|
||||
func (n Numeric) MarshalJSON() ([]byte, error) {
|
||||
if n.Int.Int64() == 0 {
|
||||
if n.Int == nil || n.Int.Int64() == 0 {
|
||||
return []byte("0"), nil
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user