Folded a PC8080 change back into PCx86

This commit is contained in:
Jeff Parsons 2016-08-18 11:32:10 -07:00
commit a3c0995934

View file

@ -1414,6 +1414,7 @@ Computer.prototype.onReset = function()
*/ */
Computer.prototype.getMachineComponent = function(sType, componentPrev) Computer.prototype.getMachineComponent = function(sType, componentPrev)
{ {
var componentLast = componentPrev;
var aComponents = Component.getComponents(this.id); var aComponents = Component.getComponents(this.id);
for (var iComponent = 0; iComponent < aComponents.length; iComponent++) { for (var iComponent = 0; iComponent < aComponents.length; iComponent++) {
var component = aComponents[iComponent]; var component = aComponents[iComponent];
@ -1423,6 +1424,7 @@ Computer.prototype.getMachineComponent = function(sType, componentPrev)
} }
if (component.type == sType) return component; if (component.type == sType) return component;
} }
if (!componentLast) Component.log("Machine component type '" + sType + "' not found", "warning");
return null; return null;
}; };