amp-prototyper icon indicating copy to clipboard operation
amp-prototyper copied to clipboard

Add http(s) checking for the inputted URL.

Open jonchenn opened this issue 5 years ago • 0 comments

The code breaks when passing a URL without http(s). E.g.

./amp-prototyper www.dickies.com/

This returns jonchen@jonchen02:~/workspace/amp-prototyper$ ./amp-prototyper www.dickies.com TypeError: Cannot read property '0' of null at amplifyFunc (/usr/local/google/home/jonchen/workspace/amp-prototyper/src/core.js:349:61) at amplify (/usr/local/google/home/jonchen/workspace/amp-prototyper/src/core.js:481:11) at <anonymous> at process._tickCallback (internal/process/next_tick.js:189:7)

jonchenn avatar Jul 09 '19 18:07 jonchenn