Skip to content

Commit

Permalink
feat: make .key and .value read only
Browse files Browse the repository at this point in the history
All properties default to false so I basically removed them all.
  • Loading branch information
posva committed Apr 15, 2018
1 parent 6978730 commit 7419c27
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion examples/todo-app/index.html
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<title>VueFire Todo App Demo</title>
<script src="https://www.gstatic.com/firebasejs/4.2.0/firebase.js"></script>
<script src="https://www.gstatic.com/firebasejs/4.11.0/firebase.js"></script>
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<script src="../../dist/vuefire.js"></script>
</head>
Expand Down
6 changes: 0 additions & 6 deletions src/vuefire.js
Expand Up @@ -52,16 +52,10 @@ function createRecord (snapshot) {
} else {
res = {}
Object.defineProperty(res, '.value', {
enumerable: false,
configurable: true,
writable: true,
value: value
})
}
Object.defineProperty(res, '.key', {
enumerable: false,
configurable: true,
writable: true,
value: _getKey(snapshot)
})
return res
Expand Down

0 comments on commit 7419c27

Please sign in to comment.