Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add defaultValue return to guard
  • Loading branch information
addyosmani committed May 18, 2016
commit 62b6b2cc4af4763302cf2acd8b0d4aad8af90630
4 changes: 3 additions & 1 deletion src/utils/storage.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module.exports = {
get(key, defaultValue) {
if (typeof window !== 'undefined') {
if (typeof window === 'undefined') {
return defaultValue
} else {
var value = window.localStorage[key]
return (typeof value != 'undefined' ? value : defaultValue)
}
Expand Down