Skip to content

Commit 155a7d0

Browse files
committed
Merge pull request locutusjs#22 from jackmoore/master
Small optimizations
2 parents e734f64 + ca25e05 commit 155a7d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

functions/datetime/date.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ function date (format, timestamp) {
254254
};
255255
this.date = function (format, timestamp) {
256256
that = this;
257-
jsdate = ((typeof timestamp === 'undefined') ? new Date() : // Not provided
257+
jsdate = (timestamp == null ? new Date() : // Not provided
258258
(timestamp instanceof Date) ? new Date(timestamp) : // JS Date()
259259
new Date(timestamp * 1000) // UNIX timestamp (auto-convert to int)
260260
);

0 commit comments

Comments
 (0)