match[2] is undefined for metadata with no value #1391

Closed
alesadam opened this Issue Aug 9, 2011 · 1 comment

Projects

None yet

2 participants

alesadam commented Aug 9, 2011

In previous versions one could add 'empty' metadata headers:

// @copyright   2009-2011 Alesa Dam
// @license GPL v3+
// @licstart    The following is the entire license notice for this script.
/*
 * Copyright (C) 2009-2011 Alesa Dam
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details 
 * at <http://www.gnu.org/licenses/>.
 */
// @licend
//
// ==/UserScript==

version 0.9.7 errors out on the empty @licend, while previous versions did not

The error in the console reads:
match[2] is undefined chrome://greasemonkey/content/config.js Line: 158

alesadam commented Aug 9, 2011

A workaround is simple enough:
// @licend End of license

@arantius arantius closed this in 9e15798 Aug 9, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment