User prompt
Fix Bug: 'TypeError: null is not an object (evaluating 'customer.x')' in this line: 'customer.x += 20;' Line Number: 168
User prompt
Fix Bug: 'TypeError: customer is null' in this line: 'customer.x += 20;' Line Number: 168
User prompt
Fix Bug: 'TypeError: customer is null' in this line: 'customer.x += 20;' Line Number: 168
User prompt
Fix Bug: 'TypeError: customer is null' in this line: 'customer.x += 20;' Line Number: 166
User prompt
Fix Bug: 'TypeError: customer is null' in this line: 'customer.x += 20;' Line Number: 167
User prompt
Fix Bug: 'TypeError: customer is null' in this line: 'customer.x += 20;' Line Number: 167
===================================================================
--- original.js
+++ change.js
@@ -124,20 +124,20 @@
} else if (self.bufferTime && LK.ticks >= self.bufferTime) {
self.bufferTime = null;
}
if (customer) {
- if (customer.x < 0) {
+ if (customer && customer.x < 0) {
customer.x += 20;
- } else if (bubbleTea.ingredients.length == customer.order.ingredients.length && bubbleTea.ingredients.sort().join() === customer.order.ingredients.sort().join()) {
+ } else if (customer && bubbleTea.ingredients.length == customer.order.ingredients.length && bubbleTea.ingredients.sort().join() === customer.order.ingredients.sort().join()) {
customer.x += 20;
if (customer.x > 2048 + customer.width) {
customer.destroy();
customer = null;
bubbleTea.ingredients = [];
}
- } else if (bubbleTea.ingredients.length != customer.order.ingredients.length && customer.x > 0) {
+ } else if (customer && bubbleTea.ingredients.length != customer.order.ingredients.length && customer.x > 0) {
customer.x -= 20;
- } else if (customer.x > 2048 + customer.width) {
+ } else if (customer && customer.x > 2048 + customer.width) {
customer.x = 2048 + customer.width;
customer.destroy();
customer = null;
bubbleTea.ingredients = [];
Fruit jelly boba pearls, no cup Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pile of Fruit jelly boba pearls, no cup Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
kawaii harajuku customer, mask, Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
fruit shiny anime, no face Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
boba pearls, pile, no cup, shiny anime Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
red bean, shiny anime, pile no cup Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
shiny plastic cup, no lid, anime, empty Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
whipped milk foam, creamy fluff, anime, Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
flan pudding, shiny, anime Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
anime angry lines, red cross Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
boba tea shop logo, kawaii anime, circular logo Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Tea shop interior, anime cafe Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Speech bubble 💬, "don't drop!" Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
UI point box, white square Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.