Skip to content

Commit fed7d4e

Browse files
Fix validation issue
1 parent 287d61b commit fed7d4e

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
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,6 +1,6 @@
11
{
22
"name": "@splitsoftware/splitio",
3-
"version": "11.5.1-rc.0",
3+
"version": "11.5.1-rc.1",
44
"description": "Split SDK",
55
"files": [
66
"README.md",

src/settings/defaults/version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const packageVersion = '11.5.1-rc.0';
1+
export const packageVersion = '11.5.1-rc.1';

src/settings/storage/browser.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { isLocalStorageAvailable } from '@splitsoftware/splitio-commons/src/utils/env/isLocalStorageAvailable';
21
import { LOCALHOST_MODE, STORAGE_MEMORY } from '@splitsoftware/splitio-commons/src/utils/constants';
32

43
const STORAGE_LOCALSTORAGE = 'LOCALSTORAGE';
@@ -29,12 +28,10 @@ export function validateStorage(settings) {
2928
fallbackToMemory();
3029
}
3130

32-
// If an invalid storage type is provided OR we want to use LOCALSTORAGE and
33-
// it's not available, fallback into MEMORY
34-
if (type !== STORAGE_MEMORY && type !== STORAGE_LOCALSTORAGE ||
35-
type === STORAGE_LOCALSTORAGE && !isLocalStorageAvailable()) {
31+
// If an invalid storage type is provided, fallback into MEMORY
32+
if (type !== STORAGE_MEMORY && type !== STORAGE_LOCALSTORAGE) {
3633
fallbackToMemory();
37-
log.error('Invalid or unavailable storage. Fallback into MEMORY storage');
34+
log.error('Invalid storage type. Fallback into MEMORY storage');
3835
}
3936

4037
return {

0 commit comments

Comments
 (0)