Skip to content

Commit ec97b7f

Browse files
committed
Merge branch 'release/3.0.2'
2 parents 7891863 + c6b6fad commit ec97b7f

5 files changed

Lines changed: 19 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [3.0.2] - 2021-01-21
8+
9+
### Fixed
10+
11+
- Temporary workaround for missing browser sizes (#217)
12+
713
## [3.0.1] - 2021-01-21
814

915
### Fixed

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "ackee",
33
"private": true,
4-
"version": "3.0.1",
4+
"version": "3.0.2",
55
"authors": [
66
"Tobias Reich <tobias@electerious.com>"
77
],

src/database/sizes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const get = async (ids, sorting, type, range, limit, dateDetails) => {
2020
[ `${ entry._id.screenHeight }px`, [ entry._id.screenHeight ]],
2121
[ `${ entry._id.browserWidth }px`, [ entry._id.browserWidth ]],
2222
[ `${ entry._id.browserHeight }px`, [ entry._id.browserHeight ]]
23-
]),
23+
], '0px'),
2424
count: entry.count,
2525
created: entry.created
2626
}))

src/utils/bestMatch.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
'use strict'
22

3-
module.exports = (matches) => {
3+
module.exports = (matches, fallback) => {
44

55
// Find the first item that only consists if defined values
6-
return matches.reduce((prev, [ key, values ]) => {
6+
const result = matches.reduce((prev, [ key, values ]) => {
77
return values.every(Boolean) === true && prev == null ? key : prev
88
}, undefined)
99

10+
if (result != null) {
11+
return result
12+
}
13+
14+
if (fallback != null) {
15+
return fallback
16+
}
17+
1018
}

0 commit comments

Comments
 (0)