Ultra-wideband (UWB) is a very promising indoor wireless positioning technology. However, in the harsh and volatile indoor environment, the propagation of UWB signals is vulnerable to non-line-of-sight (NLOS) conditions, and the contaminated range measurements will degrade the accuracy for UWB localization. Therefore, it is necessary to identify LOS/NLOS. Recent studies mainly focus on the identification of UWB signal propagation conditions by using channel impulse response (CIR) or extracted channel statistical features. However, these studies usually only focus on specific indoor environment or stable indoor conditions. In fact, the indoor environment is harsh and changeable. In order to deal with the dynamic and uncertain information of the indoor environments, this paper proposes a robust method to identify LOS/NLOS using fuzzy decision tree (FDT) based on Bayesian optimization. The proposed method first extracts the classification features from the CIRs, and then fuzzifies the features. Finally, it combines Bayesian optimization to construct the FDT, so as to identify the propagation conditions of UWB signals. The experimental results show that the identification accuracy of the proposed method is higher than 90 % in both static and dynamic experiments, and the overall performance is excellent. Compared with other methods, it has certain advantages and robustness.