added null check

This commit is contained in:
Tony Tam
2014-09-20 21:20:04 -07:00
parent b9d6f388e9
commit 8258d8b4d9

View File

@@ -26,7 +26,7 @@
<script type="text/javascript">
$(function () {
var url = window.location.search.match(/url=([^&]+)/);
if (url.length > 1) {
if (url && url.length > 1) {
url = url[1];
} else {
url = "http://petstore.swagger.wordnik.com/v2/swagger.json";