amp-prototyper
amp-prototyper copied to clipboard
Add http(s) checking for the inputted URL.
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)