Skip to content

Commit 3c4a9c8

Browse files
author
Sergey Dolin
committed
v 1.0.2 activate/active
1 parent e81b3d9 commit 3c4a9c8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ function currentLocale(){
1111

1212
var prototype_mongoose=function(){
1313
var ma = mongoose.Schema.prototype.add;
14-
if (mongoose.Schema.protection.localized) return;
15-
mongoose.Schema.protection.localized=()=>true;
14+
if (mongoose.Schema.prototype.localized) return;
15+
mongoose.Schema.prototype.localized=()=>true;
1616

1717
//traverse over all fields and modify the objects having "localize" attribute
1818
var addI18n=function(schema,obj,prefix){
@@ -99,7 +99,7 @@ module.exports = {
9999
locales=sLocales;
100100
},
101101
activate:prototype_mongoose,
102-
active:()=>!!mongoose.Schema.protection.localized
102+
active:()=>!!mongoose.Schema.prototype.localized
103103
}
104104

105105

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
],
66
"name": "mongoose-localize",
77
"description": "A module to conver mongoose model property to set of localized properties.",
8-
"version": "1.0.2",
8+
"version": "1.0.3",
99
"keywords": [
1010
"mongoose",
1111
"localize",

0 commit comments

Comments
 (0)