chrisdiana / cms.js

Client-Side JavaScript Site Generator

Home Page:http://chrisdiana.github.io/cms.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

url is global

dotnetCarpenter opened this issue · comments

On line https://github.com/cdmedia/cms.js/blob/master/js/cms.js#L263 and https://github.com/cdmedia/cms.js/blob/master/js/cms.js#L265 url is defined inside an if statement. You should make it custom to define all variables at the top of a function scope, to make it easier to spot mistakenly global variables or add 'use strict'; at the top to catch these reference errors.