Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #133 - nil reference to CDV_LOCAL_SERVER #135

Merged
merged 4 commits into from
Aug 14, 2018
Merged

fix #133 - nil reference to CDV_LOCAL_SERVER #135

merged 4 commits into from
Aug 14, 2018

Conversation

matejkramny
Copy link
Contributor

@matejkramny matejkramny commented Jul 31, 2018

issue is self.CDV_LOCAL_SERVER is set when server is started, not when the _file_ route is set up.

The change sets up the CDV_LOCAL_SERVER path before both so that it's safely accessible in the file handler.

@ghost
Copy link

ghost commented Jul 31, 2018

Hey @matejkramny
Your merge request worked perfectly

Thanks so much man

life saver

@fuentes73
Copy link

Thanks @matejkramny, tested and works perfectly!

@@ -755,10 +764,11 @@ -(void)setServerPath:(NSString *) path
if (restart) {
[self.webServer stop];
}
NSString *serverUrl = self.CDV_LOCAL_SERVER;

__block NSString* basePath = self.CDV_LOCAL_SERVER;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't rename to basePath as we have the self.basePath and can be confusing

Copy link
Member

@jcesarmobile jcesarmobile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a comment, other than that looks good to me

@matejkramny
Copy link
Contributor Author

@jcesarmobile updated the variable. Thanks!

@jcesarmobile jcesarmobile merged commit e4ed703 into ionic-team:master Aug 14, 2018
@jcesarmobile
Copy link
Member

Thanks! merged

@imhoffd
Copy link
Contributor

imhoffd commented Aug 14, 2018

Thank you @matejkramny! Great work 💪

@imhoffd
Copy link
Contributor

imhoffd commented Aug 14, 2018

2.0.3 is published with this fix

barnslig pushed a commit to barnslig/cordova-plugin-ionic-webview that referenced this pull request Aug 30, 2018
* fix nil reference to CDV_LOCAL_SERVER

fixes ionic-team#133

* remove empty spaces

* remove more empty spaces

* rename local basePath variable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants