Skip to content

Commit 17912c0

Browse files
committed
#161 fix, don't share same reference for start/end date for new category
1 parent a04da56 commit 17912c0

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/main/webapp/resources/js/admin/ng-app/admin-application.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -166,14 +166,17 @@
166166

167167
var createCategory = function(sticky, $scope) {
168168
var now = moment().startOf('hour');
169-
var initialDateTime = {
169+
var inceptionDateTime = {
170+
date: now.format('YYYY-MM-DD'),
171+
time: now.format('HH:mm')
172+
};
173+
var expirationDateTime = {
170174
date: now.format('YYYY-MM-DD'),
171175
time: now.format('HH:mm')
172176
};
173-
174177
var category = {
175-
inception: initialDateTime,
176-
expiration: initialDateTime,
178+
inception: inceptionDateTime,
179+
expiration: expirationDateTime,
177180
tokenGenerationRequested: false,
178181
sticky: sticky,
179182
bounded: false

0 commit comments

Comments
 (0)