maqetta/maqetta — Issue #1608: Duplicate requires added when function present on requires 
Author: billreed63
Created: 2012-01-19 17:24:32+00:00
State: open

A duplicate requires is added when a requires has a function example

````
````

The root of the issue is in ````davinci.ve.context.addHeaderScriptText(text)```` what is passed into this method is "require(["dojox/io/xhrScriptPlugin"]);' the code then checks to see if that text is already present at about line 2556

````
var oldText = scriptText.getText();
if (oldText.indexOf(text) === -1) {
var newText = oldText + '\n' + text;
scriptText.setText(oldText + '\n' + text);
// XXX For some reason,