mirror of https://github.com/lukechilds/node.git
Browse Source
`'use strict'` changes the behavior for `Function.prototype.call` when the context is `undefined`. In earlier versions of node the value `undefined` would make `url.format` look for fields in the global scope. The docs states that `url.format` takes a parsed URL object and returns a formatted URL string. So with this change it will now throw for other values. The exception is if the input is a string. Then it will call `url.parse` on the string and then format it. The reason for that is that you can call `url.format` on strings to clean up potentially wonky urls. Fixes: https://github.com/iojs/io.js/issues/1033 PR-URL: https://github.com/iojs/io.js/pull/1036 Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Julian Duque <julianduquej@gmail.com>v1.8.0-commit
2 changed files with 24 additions and 1 deletions
Loading…
Reference in new issue