Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tomáš Peterka
jio
Commits
ba465421
Commit
ba465421
authored
Apr 17, 2014
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ram.hasOwnProperty is not a function fix
parent
d7c4e8ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
src/jio.storage/localstorage.js
src/jio.storage/localstorage.js
+8
-5
No files found.
src/jio.storage/localstorage.js
View file @
ba465421
...
@@ -64,6 +64,9 @@
...
@@ -64,6 +64,9 @@
],
function
(
exports
,
jIO
)
{
],
function
(
exports
,
jIO
)
{
"
use strict
"
;
"
use strict
"
;
var
ram
=
{},
memorystorage
,
localstorage
,
hasOwnProperty
=
Function
.
prototype
.
call
.
bind
(
Object
.
prototype
.
hasOwnProperty
);
/**
/**
* Checks if an object has no enumerable keys
* Checks if an object has no enumerable keys
*
*
...
@@ -71,17 +74,16 @@
...
@@ -71,17 +74,16 @@
* @return {Boolean} true if empty, else false
* @return {Boolean} true if empty, else false
*/
*/
function
objectIsEmpty
(
obj
)
{
function
objectIsEmpty
(
obj
)
{
/*jslint forin: true */
var
k
;
var
k
;
for
(
k
in
obj
)
{
for
(
k
in
obj
)
{
if
(
obj
.
hasOwnProperty
(
k
))
{
if
(
hasOwnProperty
(
obj
,
k
))
{
return
false
;
return
false
;
}
}
}
}
return
true
;
return
true
;
}
}
var
ram
=
{},
memorystorage
,
localstorage
;
/*
/*
* Wrapper for the localStorage used to simplify instion of any kind of
* Wrapper for the localStorage used to simplify instion of any kind of
* values
* values
...
@@ -414,11 +416,12 @@
...
@@ -414,11 +416,12 @@
"
^
"
+
jIO
.
Query
.
stringEscapeRegexpCharacters
(
this
.
_localpath
)
+
"
^
"
+
jIO
.
Query
.
stringEscapeRegexpCharacters
(
this
.
_localpath
)
+
"
/[^/]+$
"
"
/[^/]+$
"
);
);
/*jslint forin: true */
if
(
options
.
query
===
undefined
&&
options
.
sort_on
===
undefined
&&
if
(
options
.
query
===
undefined
&&
options
.
sort_on
===
undefined
&&
options
.
select_list
===
undefined
)
{
options
.
select_list
===
undefined
)
{
rows
=
[];
rows
=
[];
for
(
i
in
this
.
_database
)
{
for
(
i
in
this
.
_database
)
{
if
(
this
.
_database
.
hasOwnProperty
(
i
))
{
if
(
hasOwnProperty
(
this
.
_database
,
i
))
{
// filter non-documents
// filter non-documents
if
(
path_re
.
test
(
i
))
{
if
(
path_re
.
test
(
i
))
{
row
=
{
value
:
{}
};
row
=
{
value
:
{}
};
...
@@ -434,7 +437,7 @@
...
@@ -434,7 +437,7 @@
}
else
{
}
else
{
// create jio query object from returned results
// create jio query object from returned results
for
(
i
in
this
.
_database
)
{
for
(
i
in
this
.
_database
)
{
if
(
this
.
_database
.
hasOwnProperty
(
i
))
{
if
(
hasOwnProperty
(
this
.
_database
,
i
))
{
if
(
path_re
.
test
(
i
))
{
if
(
path_re
.
test
(
i
))
{
document_list
.
push
(
this
.
_storage
.
getItem
(
i
));
document_list
.
push
(
this
.
_storage
.
getItem
(
i
));
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment