We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 496cd3b commit 41a1ef3Copy full SHA for 41a1ef3
src/sfPath.js
@@ -1,14 +1,19 @@
1
angular.module('schemaForm').provider('sfPath',
2
[function() {
3
- var sfPath = {parse: objectpath.parse};
+
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};
9
10
// if we're on Angular 1.2.x, we need to continue using dot notation
11
if (angular.version.major === 1 && angular.version.minor < 3) {
12
sfPath.stringify = function(arr) {
13
return Array.isArray(arr) ? arr.join('.') : arr.toString();
14
};
15
} else {
- sfPath.stringify = objectpath.stringify;
16
+ sfPath.stringify = ObjectPath.stringify;
17
}
18
19
// We want this to use whichever stringify method is defined above,
0 commit comments