@micromag/data 0.3.813 → 0.3.814
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.js +2 -2
- package/package.json +3 -3
package/es/index.js
CHANGED
|
@@ -893,7 +893,7 @@ var useMedias = function useMedias() {
|
|
|
893
893
|
var useMediasRecent = function useMediasRecent(opts) {
|
|
894
894
|
var key = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'media-gallery-recent-searches';
|
|
895
895
|
var createSearch = useCallback(function (value) {
|
|
896
|
-
if (window !== undefined && value) {
|
|
896
|
+
if (typeof window !== 'undefined' && value) {
|
|
897
897
|
var recent = window.localStorage.getItem(key) || null;
|
|
898
898
|
var current = recent !== null ? JSON.parse(recent || '[]') : [];
|
|
899
899
|
var encoded = JSON.stringify([value].concat(_toConsumableArray(current)));
|
|
@@ -904,7 +904,7 @@ var useMediasRecent = function useMediasRecent(opts) {
|
|
|
904
904
|
}, [key]);
|
|
905
905
|
var getSearches = useCallback(function () {
|
|
906
906
|
var count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 5;
|
|
907
|
-
if (window !== undefined) {
|
|
907
|
+
if (typeof window !== 'undefined') {
|
|
908
908
|
var recent = window.localStorage.getItem(key) || null;
|
|
909
909
|
var current = recent !== null ? JSON.parse(recent || '[]') : [];
|
|
910
910
|
return current.slice(0, count);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/data",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.814",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@babel/runtime": "^7.13.10",
|
|
60
60
|
"@folklore/fetch": "^0.1.17",
|
|
61
61
|
"@folklore/routes": "^0.2.36",
|
|
62
|
-
"@micromag/core": "^0.3.
|
|
62
|
+
"@micromag/core": "^0.3.814",
|
|
63
63
|
"lodash": "^4.17.21",
|
|
64
64
|
"prop-types": "^15.7.2",
|
|
65
65
|
"query-string": "^9.0.0"
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"access": "public",
|
|
69
69
|
"registry": "https://registry.npmjs.org/"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "96d19c8ede8dc2e8c051ba118975258e061a8da2"
|
|
72
72
|
}
|