File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1
1
angular . module ( 'schemaForm' ) . provider ( 'sfPath' ,
2
2
[ function ( ) {
3
- var sfPath = { parse : objectpath . parse } ;
3
+
4
+ // When building with browserify it's objectpath,
5
+ // otherwise it's just objectpath.
6
+ var ObjectPath = window . ObjectPath || objectpath ;
7
+
8
+ var sfPath = { parse : ObjectPath . parse } ;
4
9
5
10
// if we're on Angular 1.2.x, we need to continue using dot notation
6
11
if ( angular . version . major === 1 && angular . version . minor < 3 ) {
7
12
sfPath . stringify = function ( arr ) {
8
13
return Array . isArray ( arr ) ? arr . join ( '.' ) : arr . toString ( ) ;
9
14
} ;
10
15
} else {
11
- sfPath . stringify = objectpath . stringify ;
16
+ sfPath . stringify = ObjectPath . stringify ;
12
17
}
13
18
14
19
// We want this to use whichever stringify method is defined above,
You can’t perform that action at this time.
0 commit comments