File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change 99
99
if ( preferences . branchKey === null ) {
100
100
throw new Error ( 'BRANCH SDK: Missing "branch-key" in <branch-config> in your config.xml. https://goo.gl/GijGKP' )
101
101
}
102
- if ( preferences . uriScheme === null ) {
103
- throw new Error ( 'BRANCH SDK: Missing "uri-scheme" in <branch-config> in your config.xml. https://goo.gl/GijGKP' )
102
+ if ( preferences . uriScheme === null || ! / ^ [ a - z A - Z 0 - 9 - . ] * $ / . test ( preferences . uriScheme ) ) {
103
+ throw new Error ( 'BRANCH SDK: Invalid "uri-scheme" in <branch-config> in your config.xml. Docs https://goo.gl/GijGKP' )
104
104
}
105
- if ( preferences . linkDomain === null ) {
106
- throw new Error ( 'BRANCH SDK: Missing "uri-scheme" in <branch-config> in your config.xml. https://goo.gl/GijGKP' )
105
+ if ( preferences . linkDomain === null || ! / ^ (? ! .* ?w w w ) .* ( [ a - z A - Z 0 - 9 ] + ( \. [ a - z A - Z 0 - 9 ] + ) + .* ) $ / . test ( preferences . linkDomain ) ) {
106
+ throw new Error ( 'BRANCH SDK: Invalid "link-domain" in <branch-config> in your config.xml. Docs https://goo.gl/GijGKP' )
107
+ }
108
+ if ( preferences . iosTeamRelease === null || ! / ^ [ a - z A - Z 0 - 9 ] { 10 } $ / . test ( preferences . iosTeamRelease ) ) {
109
+ throw new Error ( 'BRANCH SDK: Invalid "ios-team-release" in <branch-config> in your config.xml. Docs https://goo.gl/GijGKP' )
110
+ }
111
+ if ( preferences . iosTeamDebug !== null && ! / ^ [ a - z A - Z 0 - 9 ] { 10 } $ / . test ( preferences . iosTeamDebug ) ) {
112
+ throw new Error ( 'BRANCH SDK: Invalid "ios-team-debug" in <branch-config> in your config.xml. Docs https://goo.gl/GijGKP' )
113
+ }
114
+ if ( preferences . androidPrefix !== null && ! / ^ [ / ] .[ a - z A - Z 0 - 9 ] { 3 } $ / . test ( preferences . androidPrefix ) ) {
115
+ throw new Error ( 'BRANCH SDK: Invalid "android-prefix" in <branch-config> in your config.xml. Docs https://goo.gl/GijGKP' )
107
116
}
108
- if ( preferences . iosTeamProd === null ) {
109
- throw new Error ( 'BRANCH SDK: Missing "ios-team-prod" in <branch-config> in your config.xml. https://goo.gl/GijGKP' )
110
117
if ( ! ( preferences . androidTestMode === 'true' || preferences . androidTestMode === 'false' ) ) {
111
118
throw new Error ( 'BRANCH SDK: Invalid "android-testmode" in <branch-config> in your config.xml. Docs https://goo.gl/GijGKP' )
112
119
}
You can’t perform that action at this time.
0 commit comments