Commit 07a42e0
refactor: simplify null coalescing and optional chaining in getOverlapping (#265)
* refactor(IslamicCalendar): simplify null coalescing and optional chaining in getOverlapping
Replaced explicit null check and exception throw with null coalescing + throw expression.
Also added optional chaining to ensure safer date calculation using CarbonImmutable.
* refactor(IndianCalender): simplify null coalescing and optional chaining in getOverlapping
Replaced explicit null check and exception throw with null coalescing + throw expression.
Also added optional chaining to ensure safer date calculation using CarbonImmutable.
---------
Co-authored-by: root <root@localhost>1 parent 19a720c commit 07a42e0
2 files changed
+6
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
| 113 | + | |
118 | 114 | | |
119 | 115 | | |
120 | 116 | | |
121 | 117 | | |
122 | 118 | | |
123 | 119 | | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
| 120 | + | |
129 | 121 | | |
130 | | - | |
| 122 | + | |
131 | 123 | | |
132 | 124 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
| 127 | + | |
132 | 128 | | |
133 | 129 | | |
134 | 130 | | |
135 | 131 | | |
136 | 132 | | |
137 | 133 | | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
| 134 | + | |
143 | 135 | | |
144 | | - | |
| 136 | + | |
145 | 137 | | |
146 | 138 | | |
147 | 139 | | |
| |||
0 commit comments