File tree Expand file tree Collapse file tree
packages/react-native-contentpass-ui/src/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ const MESSAGE_PROTOCOL = 'contentpass-first-layer';
99const buildGlueCodeJs = ( firstLayerUrl : string ) => `
1010 (function () {
1111 try {
12- if (window.location.href === 'about:blank') {
12+ if (!window.location.href || window.location.href === 'about:blank') {
1313 var encodedUrl = '${ encodeURIComponent ( firstLayerUrl ) } ';
1414 var decodedUrl = decodeURIComponent(encodedUrl);
1515 window.location.href = decodedUrl;
@@ -35,11 +35,11 @@ const buildGlueCodeJs = (firstLayerUrl: string) => `
3535const styles = StyleSheet . create ( {
3636 container : {
3737 flex : 1 ,
38- backgroundColor : 'white ' ,
38+ backgroundColor : 'transparent ' ,
3939 } ,
4040 webview : {
4141 flex : 1 ,
42- backgroundColor : 'red ' ,
42+ backgroundColor : 'transparent ' ,
4343 } ,
4444 error : {
4545 flex : 1 ,
@@ -153,7 +153,7 @@ export default function ContentpassLayer({
153153 return (
154154 < View style = { styles . container } >
155155 < WebView
156- source = { { uri : 'about:blank ' } }
156+ source = { { html : '' } }
157157 style = { styles . webview }
158158 originWhitelist = { [ '*' ] }
159159 startInLoadingState
You can’t perform that action at this time.
0 commit comments